diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 662cfae0db1d0..01355b0f529fe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -414,7 +414,8 @@ $ cd packages/@aws-cdk/aws-ec2 $ ../../../scripts/buildup ``` -Note that `buildup` uses `foreach.sh`, which means it's resumable. If your build fails and you wish to resume, just run `buildup` again. If you wish to restart, run `buildup --restart`. +Note that `buildup` uses `foreach.sh`, which means it's resumable. If your build fails and you wish to resume, just run +`buildup --resume`. If you wish to restart, run `buildup` again. ### Quick Iteration diff --git a/scripts/buildup b/scripts/buildup index f9cc870106261..3fea629af9976 100755 --- a/scripts/buildup +++ b/scripts/buildup @@ -4,17 +4,21 @@ scriptdir=$(cd $(dirname $0) && pwd) echo "************************************************************" echo " buildup usage:" -echo " - execute 'buildup' again to resume after failure" -echo " - execute 'buildup --restart' to restart" +echo " - execute 'buildup --resume' to resume after failure" +echo " - execute 'buildup' to restart the build from the start" echo "" echo " for advanced usage, see ${scriptdir}/foreach.sh" echo "************************************************************" -if [ "${1:-}" == "--restart" ] || [ "${1:-}" == "--reset" ]; then +if [ "$#" -eq 0 ]; then ${scriptdir}/foreach.sh --reset +else + if [ "$1" != "--resume" ]; then + echo "Unknown option: $1" + exit 1 + fi fi - ${scriptdir}/foreach.sh --up yarn build ${scriptdir}/foreach.sh --reset