diff --git a/.travis.yml b/.travis.yml index b0fe32f..25671d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,13 +71,14 @@ after_success: elif [ "$ARTIFACT" = "true" ] && [ -n "$TRAVIS_TAG" ]; then # upload binary artifact when this is a new tag # this needs to be jq processed to extract out the `id` value - export TAG_ID=$(curl -X GET \ + TAG_ID=$(curl -X GET \ -H "Authorization: token $GITHUB_TOKEN" \ "https://api.github.com/repos/$REPO_USERNAME/$REPO_NAME/releases" \ | jq -r '.[] | select(.tag_name == "'$TRAVIS_TAG'").id') # formulate zip - export ZIP_FILE=$BINARY_NAME-$TRAVIS_TAG.zip + ZIP_SUFFIX=`uname -s | tr '[:upper:]' '[:lower:]'`-`uname -i` + ZIP_FILE=$BINARY_NAME-$TRAVIS_TAG-$ZIP_SUFFIX.zip zip -j $ZIP_FILE "$ARTIFACTS_DIR/$BINARY_NAME" curl -X POST \ diff --git a/Cargo.lock b/Cargo.lock index 18382fe..c70a458 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -306,7 +306,7 @@ dependencies = [ [[package]] name = "terraform-zap" -version = "0.2.2" +version = "0.2.3" dependencies = [ "derive_more 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -314,7 +314,7 @@ dependencies = [ "structopt 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "structopt-derive 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "subprocess 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "terraform-zap-ignore-lib 0.2.2", + "terraform-zap-ignore-lib 0.2.3", "toml 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "vlog 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "which 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -324,7 +324,7 @@ dependencies = [ [[package]] name = "terraform-zap-ignore-lib" -version = "0.2.2" +version = "0.2.3" dependencies = [ "serde 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 3623d1f..5747235 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "terraform-zap" -version = "0.2.2" +version = "0.2.3" authors = ["Chen Weiguang "] description = "Script wrapper to perform finer terraform destroy" repository = "https://github.com/guangie88/terraform-zap" @@ -19,7 +19,7 @@ is_executable = "=0.1.0" structopt = "=0.2.7" structopt-derive = "=0.2.7" subprocess = "=0.1.12" -terraform-zap-ignore-lib = { path = "ignore-lib", version = "0.2.2" } +terraform-zap-ignore-lib = { path = "ignore-lib", version = "0.2.3" } toml = "=0.4.6" which = "=2.0.0" whiteread = "=0.4.3" diff --git a/README.md b/README.md index cb2c90e..c4bc6ba 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ commands in order to skip the above resources to possibly resolve the ## How to install -### Direct download for Linux (AMD64) +### Direct download for Linux x86_64 The easiest way is to run the install script using shell as shown below. diff --git a/ignore-lib/Cargo.toml b/ignore-lib/Cargo.toml index e92519a..2cd9d33 100644 --- a/ignore-lib/Cargo.toml +++ b/ignore-lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "terraform-zap-ignore-lib" -version = "0.2.2" +version = "0.2.3" authors = ["Chen Weiguang "] description = "Provides ignore implementation to terraform-zap" documentation = "https://docs.rs/terraform-zap-ignore-lib" diff --git a/install-linux.sh b/install-linux.sh index 734e31b..10b916d 100644 --- a/install-linux.sh +++ b/install-linux.sh @@ -12,7 +12,9 @@ LATEST_TAG=$(curl -sSf "https://api.github.com/repos/$REPO_USERNAME/$REPO_NAME/r | sed -n 's/.*"\(v.*\)".*/\1/p') BINARY_FILE=terraform-zap -ZIP_FILE=$BINARY_FILE-$LATEST_TAG.zip +ZIP_SUFFIX=`uname -s | tr '[:upper:]' '[:lower:]'`-`uname -i` +ZIP_FILE=$BINARY_NAME-$TRAVIS_TAG-$ZIP_SUFFIX.zip + BIN_DIR=/usr/local/bin # unzip cannot work on Unix pipe