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

Commit

Permalink
feat: check npm promotions
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Jun 24, 2021
1 parent fe58750 commit 9a5ffa1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ jobs:
- image: node:latest
steps:
- checkout
- jq/install
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
# if you try to use yarn here, it will attempt to use the wrong registry and throw 401s
- run: npm run promote-dist-tags
- run: ./scripts/verify-npm-promote

close-CTC:
docker:
Expand Down
12 changes: 12 additions & 0 deletions scripts/verify-npm-promote
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

# latest and rc should match after promote before RC build
TAGS=$(npm view sfdx-cli --json | jq -cr '."dist-tags"')
LATEST=$(echo $TAGS | jq -cr '.latest')
echo $LATEST
LATEST_RC=$(echo $TAGS | jq -cr '."latest-rc"')
echo $LATEST_RC
if [ LATEST != LATEST_RC ]; then
echo "latest and latest-rc do not match"
exit 1
fi

0 comments on commit 9a5ffa1

Please sign in to comment.