From 98e6c510338fb66029ab4ef5594b10ca45c9ca98 Mon Sep 17 00:00:00 2001 From: Greg Nazario Date: Sun, 16 Oct 2022 19:09:53 -0700 Subject: [PATCH] [cli] Fix naming of zips on CLI release The CLI release script was wrongly generating the file names so no releases were being added for non-windows builds --- scripts/cli/build_cli_release.ps1 | 1 + scripts/cli/build_cli_release.sh | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/cli/build_cli_release.ps1 b/scripts/cli/build_cli_release.ps1 index 3d1771a5a0d08..e635854482253 100755 --- a/scripts/cli/build_cli_release.ps1 +++ b/scripts/cli/build_cli_release.ps1 @@ -21,5 +21,6 @@ cargo build -p $CRATE_NAME --profile cli # Compress the CLI. $ZIP_NAME="$NAME-$VERSION-Windows-x86_64.zip" +echo "Compressing CLI to $ZIP_NAME" Compress-Archive -Path target\cli\$CRATE_NAME.exe -DestinationPath $ZIP_NAME diff --git a/scripts/cli/build_cli_release.sh b/scripts/cli/build_cli_release.sh index fc76676f951d6..86b71fe8c28b3 100755 --- a/scripts/cli/build_cli_release.sh +++ b/scripts/cli/build_cli_release.sh @@ -13,23 +13,21 @@ set -e NAME='aptos-cli' CRATE_NAME='aptos' CARGO_PATH="crates/$CRATE_NAME/Cargo.toml" -NAME="$1" +PLATFORM_NAME="$1" # Grab system information ARCH=`uname -m` OS=`uname -s` VERSION=`cat "$CARGO_PATH" | grep "^\w*version =" | sed 's/^.*=[ ]*"//g' | sed 's/".*$//g'` -echo "Building release $VERSION of $NAME for $OS-$NAME" +echo "Building release $VERSION of $NAME for $OS-$PLATFORM_NAME" cargo build -p $CRATE_NAME --profile cli cd target/cli/ # Compress the CLI -ZIP_NAME="$NAME-$VERSION-$NAME-$ARCH.zip" +ZIP_NAME="$NAME-$VERSION-$PLATFORM_NAME-$ARCH.zip" echo "Zipping release: $ZIP_NAME" zip $ZIP_NAME $CRATE_NAME mv $ZIP_NAME ../.. - -# TODO: Add installation instructions?