Skip to content

Commit 9a153d2

Browse files
authored
chore: add sha1 to default versions (#137)
Refs: #133
1 parent 2470f58 commit 9a153d2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/sync.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ jobs:
2020

2121
- name: "Update the package manager versions"
2222
run: |
23-
LATEST_NPM=$(curl https://registry.npmjs.org/npm | jq '.["dist-tags"].latest')
24-
LATEST_PNPM=$(curl https://registry.npmjs.org/pnpm | jq '.["dist-tags"].latest')
25-
LATEST_YARN=$(curl https://registry.npmjs.org/yarn | jq '.["dist-tags"].latest')
26-
LATEST_BERRY=$(curl https://repo.yarnpkg.com/tags | jq '.latest.stable')
23+
LATEST_BERRY_VERSION=$(curl https://repo.yarnpkg.com/tags | jq -r '.latest.stable')
24+
25+
LATEST_NPM=$(curl https://registry.npmjs.org/npm | jq '.["dist-tags"].latest + "+sha1." + .versions[.["dist-tags"].latest].dist.shasum')
26+
LATEST_PNPM=$(curl https://registry.npmjs.org/pnpm | jq '.["dist-tags"].latest + "+sha1." + .versions[.["dist-tags"].latest].dist.shasum')
27+
LATEST_YARN=$(curl https://registry.npmjs.org/yarn | jq '.["dist-tags"].latest + "+sha1." + .versions[.["dist-tags"].latest].dist.shasum')
28+
LATEST_BERRY=$(jq -n '$version + "+sha1." + $checksum' --arg version "$LATEST_BERRY_VERSION" --arg checksum "$(curl https://repo.yarnpkg.com/"$LATEST_BERRY_VERSION"/packages/yarnpkg-cli/bin/yarn.js | sha1sum - | cut -d' ' -f1)")
2729
2830
git --no-pager show HEAD:config.json | jq '. * '"{
2931
definitions: {

0 commit comments

Comments
 (0)