From a20a26af7eb4f3346dcbdfdb44e1f04af12a66c4 Mon Sep 17 00:00:00 2001 From: Chad Redman Date: Tue, 1 Nov 2022 13:20:25 -0400 Subject: [PATCH] ManualBuild should abort early on failure --- manualBuild.sh | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/manualBuild.sh b/manualBuild.sh index b5950b2..cd0beeb 100755 --- a/manualBuild.sh +++ b/manualBuild.sh @@ -1,28 +1,26 @@ source ./buildVersion.sh echo "Building tier/gte version ${VERSION_TAG}" -docker build --pull --tag=tier/gte:base-${VERSION_TAG} base/ \ -#&& docker build --build-arg VERSION_TAG=${VERSION_TAG} --tag=tier/gte:full_demo-${VERSION_TAG} full-demo \ +docker build --pull --tag=tier/gte:base-${VERSION_TAG} base/ -pushd ex101 -./manualBuild.sh -popd - -pushd ex201 -./manualBuild.sh -popd - -# pushd ex211 -# ./manualBuild.sh -# popd -# -# pushd ex301 -# ./manualBuild.sh -# popd +result=$? +if [ "$result" -ne 0 ]; then + echo "Build in base exited with status $result" + exit $result +fi -pushd ex401 -./manualBuild.sh -popd +for lesson in ex101 ex201 ex401; do + pushd ex101 + ./manualBuild.sh + result=$? + if [ "$result" -ne 0 ]; then + echo "Build in $lesson exited with status $result" + exit $result + fi + popd +done if [[ "$OSTYPE" == "darwin"* ]]; then say full build complete fi + +exit $result