about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-22 19:46:18 +0100
committerGitHub <noreply@github.com>2019-12-22 19:46:18 +0100
commit9c5b73e9a4d1833f67da69ab41f4cc80300097fc (patch)
tree963faec2cc41a9ad3ac9b844c7f421793ec81e1a /src
parentce6f0b0a1ee8e3766cdf4c63ed8377dea8dea46b (diff)
parenta6df38ec9f3c1c1126ba750e50a0a40741913ebb (diff)
downloadrust-9c5b73e9a4d1833f67da69ab41f4cc80300097fc.tar.gz
rust-9c5b73e9a4d1833f67da69ab41f4cc80300097fc.zip
Rollup merge of #67525 - Mark-Simulacrum:fix-toolstate-master, r=Centril
Utilize rust-lang/rust commit hashes in toolstate

When moving the script out of CI configuration and into a proper script
we lost track of the current directory changing (and as such the
parameters of the script needing to be different now).
Diffstat (limited to 'src')
-rwxr-xr-xsrc/ci/publish_toolstate.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ci/publish_toolstate.sh b/src/ci/publish_toolstate.sh
index d8ff7407822..4c047069571 100755
--- a/src/ci/publish_toolstate.sh
+++ b/src/ci/publish_toolstate.sh
@@ -14,12 +14,15 @@ printf 'https://%s:x-oauth-basic@github.com\n' "$TOOLSTATE_REPO_ACCESS_TOKEN" \
     > "$HOME/.git-credentials"
 git clone --depth=1 $TOOLSTATE_REPO
 
+GIT_COMMIT="$(git rev-parse HEAD)"
+GIT_COMMIT_MSG="$(git log --format=%s -n1 HEAD)"
+
 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 rev-parse HEAD)" \
-        "$(git log --format=%s -n1 HEAD)" \
+    "$BUILD_SOURCESDIRECTORY/src/tools/publish_toolstate.py" "$GIT_COMMIT" \
+        "$GIT_COMMIT_MSG" \
         "$MESSAGE_FILE" \
         "$TOOLSTATE_REPO_ACCESS_TOKEN"
     # `git commit` failing means nothing to commit.