-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
38 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
PROPOSAL_PATH=$1 | ||
|
||
# The base image is Node 16.9, which supports Corepack. | ||
# Yarn v4 requires Node 18+ but so far it's working with 16.19. | ||
export YARN_IGNORE_NODE=1 | ||
|
||
corepack enable | ||
yarn --version | ||
|
||
# Run where this script is | ||
cd "$(dirname "$(realpath -- "$0")")" | ||
|
||
pushd ./lib/ | ||
yarn install | ||
popd | ||
|
||
# TODO consider yarn workspaces to install all in one command | ||
if [ -n "$PROPOSAL_PATH" ]; then | ||
cd "../proposals/$PROPOSAL_PATH" | ||
# install only if the proposal has a yarn.lock | ||
test -n "yarn.lock" && yarn install --immutable | ||
fi |