From cdf4302f4faee782e033ac0c3107cb17cb1eb4fe Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Sep 14 2017 12:09:08 +0000 Subject: Merge branch 'f27' --- diff --git a/vim-update.sh b/vim-update.sh index 38b0673..2faea55 100755 --- a/vim-update.sh +++ b/vim-update.sh @@ -86,16 +86,22 @@ if [ $CHANGES -ne 0 ]; then exit 1 fi # Check if release has pending or testing update - if not, build package + # and submit update for testing pending_update=`bodhi updates query --packages vim --status pending \ - | grep $releases` + | grep $releases_regexp` testing_update=`bodhi updates query --packages vim --status testing \ - | grep $releases` + | grep $releases_regexp` if [ "$pending_update" == "" ] && [ "$testing_update" == "" ]; then - fedpkg build --nowait - bodhi updates new --user zdohnal --type enhancement --notes "The newest \ - upstream commit" --request testing --autokarma --stable-karma 3 \ - --unstable-karma -3 vim-${UPSTREAMMAJOR}-${LASTPLFILLED}-1.\ - ${releases[@]: $branches_index: 1} + fedpkg build + if [ $? -eq 0 ]; then + bodhi updates new --user zdohnal --type enhancement --notes "The newest \ + upstream commit" --request testing --autokarma --stable-karma 3 \ + --unstable-karma -3 vim-${UPSTREAMMAJOR}-${LASTPLFILLED}-1.\ + ${releases[@]: $branches_index: 1} + else + echo "Error when building package in $branch" + exit 1 + fi else echo "There are pending/testing updates, do not build package." fi @@ -126,17 +132,23 @@ if [ $CHANGES -ne 0 ]; then exit 1 fi # Check if release has pending or testing update - if not, build package + # and submit update for testing pending_update=`bodhi updates query --packages vim --status pending \ - | grep $releases` + | grep $releases_regexp` testing_update=`bodhi updates query --packages vim --status testing \ - | grep $releases` + | grep $releases_regexp` if [ "$pending_update" == "" ] && [ "$testing_update" == "" ]; then - fedpkg build --nowait - if [ ${branches[@]: $branches_index: 1} != "master" ]; then - bodhi updates new --user zdohnal --type enhancement --notes "The newest \ - upstream commit" --request testing --autokarma --stable-karma 3 \ - --unstable-karma -3 vim-${UPSTREAMMAJOR}-${LASTPLFILLED}-1.\ - ${releases[@]: $branches_index: 1} + fedpkg build + if [ $? -eq 0 ]; then + if [ ${branches[@]: $branches_index: 1} != "master" ]; then + bodhi updates new --user zdohnal --type enhancement --notes "The newest \ + upstream commit" --request testing --autokarma --stable-karma 3 \ + --unstable-karma -3 vim-${UPSTREAMMAJOR}-${LASTPLFILLED}-1.\ + ${releases[@]: $branches_index: 1} + fi + else + echo "Error when building package for $branch" + exit 1 fi fi diff --git a/vim.spec b/vim.spec index 29dfc45..7d6691d 100644 --- a/vim.spec +++ b/vim.spec @@ -775,6 +775,7 @@ rm -rf %{buildroot} %changelog * Thu Sep 14 2017 Karsten Hopp 8.0.1102-1 +- vim-update.sh - add test for succesful build and fixing grepping of update's list - patchlevel 1102 * Wed Sep 13 2017 Karsten Hopp 8.0.1098-1