From 9a153d2d4acff0df6ab44cec6f99f09d52d0ecbf Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Fri, 8 Jul 2022 19:12:59 +0200 Subject: [PATCH] chore: add sha1 to default versions (#137) Refs: https://github.com/nodejs/corepack/pull/133 --- .github/workflows/sync.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index ad3688f9d..d3675b062 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -20,10 +20,12 @@ jobs: - name: "Update the package manager versions" run: | - LATEST_NPM=$(curl https://registry.npmjs.org/npm | jq '.["dist-tags"].latest') - LATEST_PNPM=$(curl https://registry.npmjs.org/pnpm | jq '.["dist-tags"].latest') - LATEST_YARN=$(curl https://registry.npmjs.org/yarn | jq '.["dist-tags"].latest') - LATEST_BERRY=$(curl https://repo.yarnpkg.com/tags | jq '.latest.stable') + LATEST_BERRY_VERSION=$(curl https://repo.yarnpkg.com/tags | jq -r '.latest.stable') + + LATEST_NPM=$(curl https://registry.npmjs.org/npm | jq '.["dist-tags"].latest + "+sha1." + .versions[.["dist-tags"].latest].dist.shasum') + LATEST_PNPM=$(curl https://registry.npmjs.org/pnpm | jq '.["dist-tags"].latest + "+sha1." + .versions[.["dist-tags"].latest].dist.shasum') + LATEST_YARN=$(curl https://registry.npmjs.org/yarn | jq '.["dist-tags"].latest + "+sha1." + .versions[.["dist-tags"].latest].dist.shasum') + 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)") git --no-pager show HEAD:config.json | jq '. * '"{ definitions: {