From 042fb6f4d58736346d5227dd875d3926bb53f229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Fri, 25 Feb 2022 23:36:05 +0100 Subject: [PATCH] build: add corepack to the auto-updated dependencies PR-URL: https://github.com/nodejs/node/pull/42090 Reviewed-By: Antoine du Hamel Reviewed-By: Mestery --- .github/workflows/tools.yml | 4 ++++ Makefile | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 7865a4166f81eb..a9ae1372e42bd9 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -23,6 +23,10 @@ jobs: echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV ./update-eslint.sh fi + - 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 diff --git a/Makefile b/Makefile index 0e5b6d5d1cdf07..3c48653d05c0c6 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 + 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 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