2020-03-11 23:14:16 +03:00
|
|
|
#!/bin/bash -ex
|
|
|
|
|
|
|
|
MODULE=$1
|
|
|
|
DIR=$(dirname "$0")
|
2020-03-12 19:20:32 +03:00
|
|
|
cd "$DIR/.."
|
2020-03-11 23:14:16 +03:00
|
|
|
|
|
|
|
# npm install just enough to run these scripts
|
2020-05-15 03:48:39 +03:00
|
|
|
npm i --ignore-scripts --no-optional --only=prod --no-package-lock
|
2020-03-11 23:14:16 +03:00
|
|
|
node .circleci/modules-to-test.js | tee packages/test.list
|
2020-06-12 00:36:23 +03:00
|
|
|
if ([[ "$MODULE" == "many" ]] && grep -e '.' packages/test.list > /dev/null) ||
|
|
|
|
grep -e "$MODULE" -e 'all' packages/test.list > /dev/null; then
|
|
|
|
./.circleci/assert-branch.sh
|
|
|
|
./_scripts/create-version-json.sh
|
2020-05-15 03:48:39 +03:00
|
|
|
|
2020-06-12 00:36:23 +03:00
|
|
|
yarn install --immutable
|
|
|
|
fi
|