diff --git a/build-and-update-all-branches b/build-and-update-all-branches new file mode 100755 index 0000000..53768c2 --- /dev/null +++ b/build-and-update-all-branches @@ -0,0 +1,39 @@ +#! /bin/sh + +# Prepare main branch, review the list of branches below and then execute this +# script. + +branches='main epel7 epel8 epel9 f35 f36' + +exit_handler () +{ + git checkout main +} + +trap exit_handler EXIT + +set -e +set -x + +koji hello + +tasks= +for branch in $branches; do + if test $branch != main; then + git checkout "$branch" + git merge main + fi + git push + skip_nvr_check= + if test $branch = epel7; then + skip_nvr_check=--skip-nvr-check + fi + tasks="${tasks}`fedpkg build $skip_nvr_check --nowait | grep 'Created task' | cut -d: -f2`" +done + +if test -n "$tasks"; then + koji watch-task $tasks +fi + +git checkout main +fedpkg update