-
Notifications
You must be signed in to change notification settings - Fork 4k
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
3 changed files
with
40 additions
and
17 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 |
---|---|---|
@@ -1,14 +1,27 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
scriptdir=$(cd $(dirname $0) && pwd) | ||
|
||
echo "************************************************************" | ||
echo " builddown usage:" | ||
echo " - execute 'builddown --resume' to resume after failure" | ||
echo " - execute 'builddown' to restart the build from the start" | ||
echo "" | ||
echo " for advanced usage, see ${scriptdir}/foreach.sh" | ||
echo "************************************************************" | ||
|
||
if ! [ -x "$(command -v yarn)" ]; then | ||
echo "yarn is not installed. Follow the guide to install yarn - https://yarnpkg.com/en/docs/install." | ||
exit 1 | ||
if [ "$#" -eq 0 ]; then | ||
${scriptdir}/foreach.sh --reset | ||
else | ||
if [ "$1" != "--resume" ]; then | ||
echo "Unknown option: $1" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS:-}" | ||
${scriptdir}/foreach.sh --down yarn build | ||
${scriptdir}/foreach.sh --reset | ||
|
||
scriptdir=$(cd $(dirname $0) && pwd) | ||
export PATH=$(cd $scriptdir && npm bin):$PATH | ||
scope=$(${scriptdir}/current-scope) | ||
exec lerna run ${1:-build} --scope ${scope} --include-dependents | ||
echo "************************************************************" | ||
echo "builddown done" | ||
echo "************************************************************" |
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