From 67740e18e1fe5626d429df22ace719f94638a19a Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Thu, 30 Jun 2022 01:33:33 +0200 Subject: [PATCH 1/3] chore: add shasum to default versions when available --- .github/workflows/sync.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index ad3688f9d..aa25dbe8d 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -20,9 +20,9 @@ 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_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=$(curl https://repo.yarnpkg.com/tags | jq '.latest.stable') git --no-pager show HEAD:config.json | jq '. * '"{ From d011eb83f115c44762a6420773dfff5f04e03ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Thu, 7 Jul 2022 14:38:08 +0200 Subject: [PATCH 2/3] Adds sha1sum to Yarn Berry binaries --- .github/workflows/sync.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index aa25dbe8d..722087ac5 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -20,10 +20,12 @@ jobs: - name: "Update the package manager versions" run: | + 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=$(curl https://repo.yarnpkg.com/tags | jq '.latest.stable') + 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: { From 4332e4cbba680f97fabb12005983af9d3ba135d2 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Thu, 7 Jul 2022 17:07:07 +0200 Subject: [PATCH 3/3] Remove empty spaces --- .github/workflows/sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 722087ac5..d3675b062 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -24,7 +24,7 @@ jobs: 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_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 '. * '"{