Skip to content

Commit

Permalink
v0.2.0 binary name: 'bak'
Browse files Browse the repository at this point in the history
  • Loading branch information
roylaurie committed May 6, 2024
1 parent ce01345 commit 81e73db
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bak9"
version = "0.1.2"
version = "0.2.0"
edition = "2021"
description = "Creates a backup .bak copy of a file"
authors = ["Asmov LLC <[email protected]>"]
Expand All @@ -9,6 +9,10 @@ license = "GPL-3.0-or-later"
keywords = ["backup", "copy"]
categories = ["command-line-utilities", "filesystem"]

[[bin]]
name = "bak"
path = "src/main.rs"

[dependencies]
clap = { version = "4", features = ["derive"] }
colored = "2"
Expand Down
3 changes: 2 additions & 1 deletion tools/common.lib.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ RELEASE_TARGETS=(
"${TARGET_WINDOWS_X86_64}"
)

CARGO_NAME="$(grep '^name' "${PROJECT_DIR}/Cargo.toml" | cut -d '"' -f 2)"
CARGO_NAME="$(grep -m1 '^name' "${PROJECT_DIR}/Cargo.toml" | cut -d '"' -f 2)"
CARGO_VERSION="$(grep '^version' "${PROJECT_DIR}/Cargo.toml" | cut -d '"' -f 2)"
CARGO_BIN_NAME="$(sed -n '/\[\[bin\]\]/,$p' "${PROJECT_DIR}/Cargo.toml" | grep '^name' | cut -d '"' -f 2)"
4 changes: 2 additions & 2 deletions tools/package-tarball.bash
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ for target in "${RELEASE_TARGETS[@]}"; do
rsync -a "${TARBALL_TEMPLATE_DIR}/" "${package_dir}"

if [[ "$target" != *"windows"* ]]; then
cp "${PROJECT_DIR}/target/${target}/release/${CARGO_NAME}" "${package_dir}"
cp "${PROJECT_DIR}/target/${target}/release/${CARGO_BIN_NAME}" "${package_dir}"
else
cp "${PROJECT_DIR}/target/${target}/release/${CARGO_NAME}.exe" "${package_dir}"
cp "${PROJECT_DIR}/target/${target}/release/${CARGO_BIN_NAME}.exe" "${package_dir}"
fi

cd "${package_dir}/.."
Expand Down

0 comments on commit 81e73db

Please sign in to comment.