Skip to content

Commit

Permalink
Update install-jetpack script to run any pnpm command
Browse files Browse the repository at this point in the history
  • Loading branch information
fluiddot committed Apr 21, 2023
1 parent 62aa47f commit 72a3b44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
.env.development.local
.env.test.local
.env.production.local
install-jetpack.sh.local
run-jetpack-command.sh.local

npm-debug.log*
yarn-debug.log*
Expand Down
14 changes: 6 additions & 8 deletions bin/install-jetpack.sh → bin/run-jetpack-command.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
set -Eeuo pipefail

if [ -e ./bin/install-jetpack.sh.local ]
if [ -e ./bin/run-jetpack-command.sh.local ]
then
source ./bin/install-jetpack.sh.local
source ./bin/run-jetpack-command.sh.local
exit 0
fi

Expand Down Expand Up @@ -32,16 +32,14 @@ pnpm_version=$(npx semver -c "$listed_pnpm_version")
# More information in: https://github.com/wordpress-mobile/gutenberg-mobile/issues/5688
sed -i.bak 's/^engine-strict = true/engine-strict = false/' .npmrc

# Install dependecies of Jetpack plugin
pushd projects/plugins/jetpack

# npx might prompt to install pnpm at the requested version. Let's just agree and carry on.
( yes || true ) | npx --cache /tmp/empty-cache pnpm@"$pnpm_version" install --ignore-scripts

popd
( yes || true ) | npx --cache /tmp/empty-cache pnpm@"$pnpm_version" $1

# Revert `engine-strict` parameter back
sed -i.bak 's/^engine-strict = false/engine-strict = true/' .npmrc
rm .npmrc.bak

popd

# Revert to Gutenberg node version
nvm use

0 comments on commit 72a3b44

Please sign in to comment.