Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
fix: try with sha override
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Apr 1, 2021
1 parent 2708a61 commit 8cfc050
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ workflows:
triggers:
- schedule:
# Thursdays
cron: 53 14 * * 4
cron: 08 15 * * 4
filters:
branches:
only:
Expand Down
13 changes: 8 additions & 5 deletions scripts/promote
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ set -ex
CHANNEL=latest-ci-test

CLI_RC_VERSION=${S3_PROMOTE_OVERRIDE_VERSION}
SHA_SHORT=${S3_PROMOTE_OVERRIDE_SHA}

if [ -z "${S3_PROMOTE_OVERRIDE_VERSION}" ]; then
# get RC version from npm before we promote it to latest!
CLI_RC_VERSION=$(npm show sfdx-cli --json | jq -r '.["dist-tags"] | .["latest-rc"]')
fi
echo "version to promote: $CLI_RC_VERSION"

# figure out the sha from the release
SHA=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/salesforcecli/sfdx-cli/tags | jq -cr '.[] | select(.name=='\"v$CLI_RC_VERSION\"') | .commit | .sha')
echo "found matching sha of ${SHA}"

SHA_SHORT=$(git rev-parse --short=7 ${SHA})
if [ -z "${S3_PROMOTE_OVERRIDE_SHA}" ]; then
# figure out the sha from the release
SHA=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/salesforcecli/sfdx-cli/tags | jq -cr '.[] | select(.name=='\"v$CLI_RC_VERSION\"') | .commit | .sha')
echo "found matching sha of ${SHA}"
SHA_SHORT=$(git rev-parse --short=7 ${SHA})
fi
echo "will use sha of ${SHA_SHORT}"

echo "will run command"
Expand Down

0 comments on commit 8cfc050

Please sign in to comment.