about summary refs log tree commit diff
path: root/src/ci/scripts
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2019-10-29 10:14:42 +0100
committerGitHub <noreply@github.com>2019-10-29 10:14:42 +0100
commitbdfcde439bcea75d74fe3b181d13332384daf130 (patch)
tree46a9eba58b9fb7c3832b06744844dc8f575b2396 /src/ci/scripts
parent02000505c157350496283c86710d5d314999545a (diff)
downloadrust-bdfcde439bcea75d74fe3b181d13332384daf130.tar.gz
rust-bdfcde439bcea75d74fe3b181d13332384daf130.zip
Apply suggestions from lzutao
Co-Authored-By: lzutao <taolzu@gmail.com>
Diffstat (limited to 'src/ci/scripts')
-rwxr-xr-xsrc/ci/scripts/upload-artifacts.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ci/scripts/upload-artifacts.sh b/src/ci/scripts/upload-artifacts.sh
index f060dd28f71..625cf378a9b 100755
--- a/src/ci/scripts/upload-artifacts.sh
+++ b/src/ci/scripts/upload-artifacts.sh
@@ -11,7 +11,7 @@ source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
 upload_dir="$(mktemp -d)"
 
 # Release tarballs produced by a dist builder.
-if [[ "${DEPLOY-0}" = "1" ]] || [[ "${DEPLOY_ALT-0}" = "1" ]]; then
+if [[ "${DEPLOY-0}" -eq "1" ]] || [[ "${DEPLOY_ALT-0}" -eq "1" ]]; then
     dist_dir=build/dist
     if isLinux; then
         dist_dir=obj/build/dist
@@ -24,7 +24,7 @@ fi
 cp cpu-usage.csv "${upload_dir}/cpu-${CI_JOB_NAME}.csv"
 
 # Toolstate data.
-if [[ ! -z "${DEPLOY_TOOLSTATES_JSON+x}" ]]; then
+if [[ -n "${DEPLOY_TOOLSTATES_JSON+x}" ]]; then
     cp /tmp/toolstates.json "${upload_dir}/${DEPLOY_TOOLSTATES_JSON}"
 fi
 
@@ -33,7 +33,7 @@ ls -lah "${upload_dir}"
 echo
 
 deploy_dir="rustc-builds"
-if [[ "${DEPLOY_ALT-0}" = "1" ]]; then
+if [[ "${DEPLOY_ALT-0}" -eq "1" ]]; then
     deploy_dir="rustc-builds-alt"
 fi
 deploy_url="s3://${DEPLOY_BUCKET}/${deploy_dir}/$(ciCommit)"