Skip to content

Commit

Permalink
build: add corepack to the auto-updated dependencies
Browse files Browse the repository at this point in the history
PR-URL: nodejs#42090
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
  • Loading branch information
arcanis authored and sxa committed Mar 7, 2022
1 parent 2e1231b commit 3fc3f52
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3fc3f52

Please sign in to comment.