From c8f932793230fe7a7328aba5bad57a8ba84153c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Wed, 23 Feb 2022 11:03:37 +0100 Subject: [PATCH 1/3] build: add corepack to the auto-updated dependencies --- .github/workflows/tools.yml | 3 +++ Makefile | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 7865a4166f81eb..dc3370f773a435 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -23,6 +23,9 @@ jobs: echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV ./update-eslint.sh fi + - id: corepack + run: | + make corepack-update - id: lint-md-dependencies run: | cd tools/lint-md diff --git a/Makefile b/Makefile index 8b1b1f16014cd9..8fae28b6277cdb 100644 --- a/Makefile +++ b/Makefile @@ -1119,13 +1119,15 @@ pkg: $(PKG) .PHONY: corepack-update corepack-update: - rm -rf /tmp/node-corepack-clone - git clone 'https://github.com/nodejs/corepack.git' /tmp/node-corepack-clone - cd /tmp/node-corepack-clone && yarn pack - rm -rf deps/corepack && mkdir -p deps/corepack - cd deps/corepack && tar xf /tmp/node-corepack-clone/package.tgz --strip-components=1 + mkdir -p /tmp/node-corepack + wget -q "$$(npm view corepack dist.tarball)" -O /tmp/node-corepack/package.tgz + + rm -rf deps/corepack && mkdir deps/corepack + cd deps/corepack && tar xf /tmp/node-corepack/package.tgz --strip-components=1 chmod +x deps/corepack/shims/* + node deps/corepack/dist/corepack.js --version + .PHONY: pkg-upload # Note: this is strictly for release builds on release machines only. pkg-upload: pkg From a37a439183fafae3b3d34eb8165dadfd7e5b362e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Wed, 23 Feb 2022 14:09:36 +0100 Subject: [PATCH 2/3] Adds NEW_VERSION to the workflow Co-authored-by: Mestery --- .github/workflows/tools.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index dc3370f773a435..a9ae1372e42bd9 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -26,6 +26,7 @@ jobs: - id: corepack run: | make corepack-update + echo "NEW_VERSION=$(node deps/corepack/dist/corepack.js --version)" >> $GITHUB_ENV - id: lint-md-dependencies run: | cd tools/lint-md From 6b9e24313c2767c164665496df1e6d5880870ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Thu, 24 Feb 2022 12:20:27 +0100 Subject: [PATCH 3/3] Prefers curl over wget Co-authored-by: Antoine du Hamel --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8fae28b6277cdb..4aace77c7c8c63 100644 --- a/Makefile +++ b/Makefile @@ -1120,7 +1120,7 @@ pkg: $(PKG) .PHONY: corepack-update corepack-update: mkdir -p /tmp/node-corepack - wget -q "$$(npm view corepack dist.tarball)" -O /tmp/node-corepack/package.tgz + curl -qLo /tmp/node-corepack/package.tgz "$$(npm view corepack dist.tarball)" rm -rf deps/corepack && mkdir deps/corepack cd deps/corepack && tar xf /tmp/node-corepack/package.tgz --strip-components=1