From c7e9fc54d91f8223ad5e8f50aea86e3b487a304c Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 5 Jul 2022 10:02:29 +0200 Subject: [PATCH] Add a release helper script --- build-and-update-all-branches | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 build-and-update-all-branches 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