build: add corepack to the auto-updated dependencies

PR-URL: https://github.com/nodejs/node/pull/42090
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
pull/42137/head
Maël Nison 2022-02-25 23:36:05 +01:00 committed by GitHub
parent 65b60b5676
commit e84b635db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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