Change default so if MAX_STAGE is not specified, all stages run
This commit is contained in:
parent
3ad5bce2ae
commit
34e7bae0cf
9
build.sh
9
build.sh
|
@ -128,12 +128,9 @@ if [ -z "${IMG_NAME}" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${MAX_STAGE}" ]; then
|
if [ -n "${RUN_STAGE}" ]; then
|
||||||
MAX_STAGE=4
|
|
||||||
fi
|
|
||||||
if [ -n $RUN_STAGE ]; then
|
|
||||||
echo "Running ONLY stage${RUN_STAGE}"
|
echo "Running ONLY stage${RUN_STAGE}"
|
||||||
else
|
elif [ -n "${MAX_STAGE}" ]; then
|
||||||
echo "Running stage${MAX_STAGE} build"
|
echo "Running stage${MAX_STAGE} build"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -176,7 +173,7 @@ log "Begin ${BASE_DIR}"
|
||||||
|
|
||||||
for STAGE_DIR in ${BASE_DIR}/stage*; do
|
for STAGE_DIR in ${BASE_DIR}/stage*; do
|
||||||
STAGE_DIR_NUM=$(echo $STAGE_DIR | grep -o -E "[0-9]+$")
|
STAGE_DIR_NUM=$(echo $STAGE_DIR | grep -o -E "[0-9]+$")
|
||||||
if [[ (-z $RUN_STAGE || $STAGE_DIR_NUM -eq $RUN_STAGE) && $STAGE_DIR_NUM -le $MAX_STAGE ]]; then
|
if [[ (-z $RUN_STAGE || $STAGE_DIR_NUM -eq $RUN_STAGE) && (-z $MAX_STAGE || $STAGE_DIR_NUM -le $MAX_STAGE) ]]; then
|
||||||
run_stage
|
run_stage
|
||||||
else
|
else
|
||||||
echo "Skipping ${STAGE_DIR}"
|
echo "Skipping ${STAGE_DIR}"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user