index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/build-packages | 12 |
diff --git a/bin/build-packages b/bin/build-packages index 3b365c4..b960404 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -19,17 +19,19 @@ usage() { >&2 echo ' -n count: Build $count packages (if available), then exit.' >&2 echo ' $count=0 is interpreted as infinity.' >&2 echo ' The default is $count=1.' + >&2 echo ' -x: If package build fails, do not request new assignment(s).' [ -z "$1" ] && exit 1 || exit $1 } eval set -- "$( - getopt -o hn: \ + getopt -o hn:x \ --long help \ -n "$(basename "$0")" -- "$@" || \ echo usage )" count=1 +exit_after_failure=false while true do @@ -43,6 +45,9 @@ do [ ${count} -eq 0 ] && \ count=-1 ;; + -x) + exit_after_failure=true + ;; --) shift break @@ -121,6 +126,7 @@ while [ ${count} -ne 0 ]; do < 'package.tar' case $? in 0) + # upload successful break ;; 1) @@ -151,6 +157,10 @@ while [ ${count} -ne 0 ]; do -p "${master_build_server_port}" \ "${master_build_server_user}@${master_build_server}" \ 'return-assignment' "${package}" "${git_revision}" "${mod_git_revision}" "${repository}" 'ERROR' + if ${exit_after_failure}; then + >&2 echo 'Build failed, exiting now' + exit + fi fi continue |