Skip to content

Commit

Permalink
[cli] Fix naming of zips on CLI release
Browse files Browse the repository at this point in the history
The CLI release script was wrongly generating the file names
so no releases were being added for non-windows builds
  • Loading branch information
gregnazario committed Oct 17, 2022
1 parent fba387e commit 98e6c51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions scripts/cli/build_cli_release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

8 changes: 3 additions & 5 deletions scripts/cli/build_cli_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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?

0 comments on commit 98e6c51

Please sign in to comment.