about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2019-12-11 15:34:02 +0100
committerPietro Albini <pietro@pietroalbini.org>2019-12-30 14:56:46 +0100
commitd9278f7ff65b3a4798348d2fc68278b25eaae864 (patch)
treec969ae3fafb2b4e8dc9c36d50a31a8be91a49fb1
parent580ac0b4f1c6f9cf76f6edafdaf9806437770aff (diff)
downloadrust-d9278f7ff65b3a4798348d2fc68278b25eaae864.tar.gz
rust-d9278f7ff65b3a4798348d2fc68278b25eaae864.zip
ci: make publish_toolstate.sh generic over the CI provider
-rwxr-xr-xsrc/ci/publish_toolstate.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ci/publish_toolstate.sh b/src/ci/publish_toolstate.sh
index 4c047069571..fb828477f98 100755
--- a/src/ci/publish_toolstate.sh
+++ b/src/ci/publish_toolstate.sh
@@ -1,6 +1,9 @@
-#!/bin/sh
+#!/bin/bash
 
-set -eu
+set -euo pipefail
+IFS=$'\n\t'
+
+source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
 
 # The following lines are also found in src/bootstrap/toolstate.rs,
 # so if updating here, please also update that file.
@@ -21,7 +24,7 @@ cd rust-toolstate
 FAILURE=1
 for RETRY_COUNT in 1 2 3 4 5; do
     #  The purpose is to publish the new "current" toolstate in the toolstate repo.
-    "$BUILD_SOURCESDIRECTORY/src/tools/publish_toolstate.py" "$GIT_COMMIT" \
+    "$(ciCheckoutPath)/src/tools/publish_toolstate.py" "$GIT_COMMIT" \
         "$GIT_COMMIT_MSG" \
         "$MESSAGE_FILE" \
         "$TOOLSTATE_REPO_ACCESS_TOKEN"