From fd9e4d04c490a5b6678ab45dfa3f33dc6589f9af Mon Sep 17 00:00:00 2001 From: Jim O'Donnell Date: Thu, 17 Oct 2024 16:01:33 +0100 Subject: [PATCH] build: ignore post-install scripts The GitHub CI workflows and Docker builds already run `yarn install` with the `--ignore-scripts` flag. This PR makes the same change to the bootstrap scripts for local development. I've also tidied up `bin/bootstrap.sh` so that it only runs the install once, then builds the various packages in order. --- bin/bootstrap.sh | 14 +++++++++----- bin/bootstrap:es6.sh | 2 +- bin/clean-install.sh | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/bin/bootstrap.sh b/bin/bootstrap.sh index e9db1d92e2..d0bba7f793 100755 --- a/bin/bootstrap.sh +++ b/bin/bootstrap.sh @@ -15,24 +15,28 @@ set -ev ROOT_DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && cd .. && pwd)" cd $ROOT_DIR +printf 'Installing dependencies...\n' +yarn install --frozen-lockfile --ignore-scripts +printf '\n' + printf 'Building `lib-react-components`...\n' -yarn workspace @zooniverse/react-components install --frozen-lockfile +yarn workspace @zooniverse/react-components build printf '\n' printf 'Building `lib-content`...\n' -yarn workspace @zooniverse/content install --frozen-lockfile +yarn workspace @zooniverse/content build printf '\n' printf 'Building `lib-user`...\n' -yarn workspace @zooniverse/user install --frozen-lockfile +yarn workspace @zooniverse/user build printf '\n' printf 'Building `lib-subject-viewers`...\n' -yarn workspace @zooniverse/subject-viewers install --frozen-lockfile +yarn workspace @zooniverse/subject-viewers build printf '\n' printf 'Building `lib-classifier`...\n' -yarn workspace @zooniverse/classifier install --frozen-lockfile +yarn workspace @zooniverse/classifier build printf '\n' printf 'Building `fe-project`...\n' diff --git a/bin/bootstrap:es6.sh b/bin/bootstrap:es6.sh index f76b0ebf1e..652d185850 100755 --- a/bin/bootstrap:es6.sh +++ b/bin/bootstrap:es6.sh @@ -16,7 +16,7 @@ ROOT_DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && cd .. && pwd)" cd $ROOT_DIR printf 'Installing dependencies...\n' -yarn install --frozen-lockfile +yarn install --frozen-lockfile --ignore-scripts printf '\n' printf 'Building `lib-react-components`...\n' diff --git a/bin/clean-install.sh b/bin/clean-install.sh index c28d89bef4..613e1e459f 100755 --- a/bin/clean-install.sh +++ b/bin/clean-install.sh @@ -17,5 +17,5 @@ for DIR in $(find $ROOT_DIR/packages -mindepth 1 -maxdepth 1 -type d) ; do printf " done!\n" done -yarn install --frozen-lockfile +yarn install --frozen-lockfile --ignore-scripts echo "Finished!"