summaryrefslogtreecommitdiffstats
path: root/abump.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-07-26 07:31:54 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-07-26 07:31:54 +0000
commitbfee7b63f923a134ac4847b44c0c451268fec65c (patch)
tree14ba6351bf8b6cc31b2b94654424ef17fbc47918 /abump.in
parentb0ea14135d03239de340a21103d18ff675f7c47f (diff)
downloadabuild-bfee7b63f923a134ac4847b44c0c451268fec65c.tar.bz2
abuild-bfee7b63f923a134ac4847b44c0c451268fec65c.tar.xz
abump: error out on first faild package
If some package fails, then stop processing the rest. This is so we don't risk test build the rest for the packages against wrong lib. For example, if 'abump libfoo-2.0 foo-2.0' fails on libfoo, we don't want testbuild foo-2.0, which might end with success against libfoo-1. We also echo the list of packages that was not bumped, so its easy to copy/paste next run.
Diffstat (limited to 'abump.in')
-rwxr-xr-xabump.in18
1 files changed, 11 insertions, 7 deletions
diff --git a/abump.in b/abump.in
index 2b0ca01..eef57d5 100755
--- a/abump.in
+++ b/abump.in
@@ -18,10 +18,14 @@ fi
# version bump packages
do_bump() {
- local p rc=0 errors=0 failed= name ver section message
+ local p rc=0 notbumped="" name ver section message
local upgrade="${cvelist:+security }upgrade"
local a
for p; do
+ if [ $rc -gt 0 ]; then
+ notbumped="$notbumped $p"
+ continue
+ fi
name=${p%-[0-9]*}
ver=${p#${name}-}
@@ -64,15 +68,15 @@ fixes #${fixes#\#}
git add APKBUILD
git commit -m"$message"
)
- if [ $? -ne 0 ]; then
- errors=$(( $errors + 1 ))
- failed="$failed $p"
+ rc=$?
+ if [ $rc -gt 0 ]; then
+ error "Failed to build $p"
fi
done
- if [ -n "$failed" ]; then
- error "Failed: $failed"
+ if [ -n "$notbumped" ]; then
+ error "Not bumped: $notbumped"
fi
- return $errors
+ return $rc
}
usage() {