]> git.lizzy.rs Git - rust.git/commitdiff
Apply suggestions from lzutao
authorPietro Albini <pietro@pietroalbini.org>
Tue, 29 Oct 2019 09:14:42 +0000 (10:14 +0100)
committerGitHub <noreply@github.com>
Tue, 29 Oct 2019 09:14:42 +0000 (10:14 +0100)
Co-Authored-By: lzutao <taolzu@gmail.com>
src/ci/scripts/upload-artifacts.sh

index f060dd28f718cbd4a3247352232e14e87383fcb5..625cf378a9be3b72a8c8d5de319e539bcb23081c 100755 (executable)
@@ -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)"