-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: promote-verify changes #1267
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ function banner() { | |
printf "\n%s\n%s\n%s\n" "$CHAR" "$1" "$CHAR" | ||
} | ||
|
||
export SF_HIDE_RELEASE_NOTES=true | ||
|
||
# Versions for the old and new channels should match after promotion | ||
banner "Verifying promote of npm dist tags: $OLD_CHANNEL -> $NEW_CHANNEL" | ||
TAGS=$(npm view @salesforce/cli --json | jq -cr '."dist-tags"') | ||
|
@@ -53,9 +55,9 @@ if [ "$NEW_VERSION" != "$OLD_MANIFEST_VERSION" ]; then | |
exit 1 | ||
fi | ||
|
||
VERSIONS_URL="https://developer.salesforce.com/media/salesforce-cli/sf/versions/sf-linux-x64-tar-xz.json" | ||
# Uncomment for testing on a M1 Mac | ||
# VERSIONS_URL="https://developer.salesforce.com/media/salesforce-cli/sf/versions/sf-darwin-arm64-tar-xz.json" | ||
VERSIONS_URL="https://developer.salesforce.com/media/salesforce-cli/sf/versions/sf-linux-x64-tar-xz.json" | ||
VERSION_CONTENT=$(curl -s "$VERSIONS_URL" | jq -cr) | ||
|
||
|
||
|
@@ -104,11 +106,17 @@ banner "Verify tarball install and that 'sf update $NEW_CHANNEL' version matches | |
# If you are testing this locally, you'll need to use a tarball built for your OS | ||
# There is a VERSIONS_URL for M1 macs above that you can uncomment | ||
# Other URLs can be found here: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm#sfdx_setup_install_cli_olderversions | ||
OLDER_VERSION_URL=$(echo "$VERSION_CONTENT" | jq 'to_entries[7]' | jq -r '.value') | ||
OLDER_VERSION_URL=$(echo "$VERSION_CONTENT" | jq 'to_entries[15]' | jq -r '.value') | ||
echo "Downloading old cli version from: $OLDER_VERSION_URL" | ||
|
||
if [[ -d "$HOME/sf" ]]; then | ||
echo "!! $HOME/sf directory already exists. Delete it and try again." && exit 1 | ||
# If the CI env var is set, delete the directory and continue | ||
if [[ -n "$CI" ]]; then | ||
echo "!! $HOME/sf directory already exists. Deleting it and continuing." | ||
rm -rf "$HOME/sf" | ||
else | ||
echo "!! $HOME/sf directory already exists. Delete it and try again." && echo 1 | ||
fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was preventing any of the |
||
fi | ||
|
||
curl -s "$OLDER_VERSION_URL" --output sf-tarball.tar.xz && mkdir "$HOME/sf" && tar xJf sf-tarball.tar.xz -C "$HOME/sf" --strip-components 1 && rm -f sf-tarball.tar.xz | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is to grab a version older than
stable
. Withnightly
builds we were grabbing a newer version at index7