From 2fbadd5ef5e374bb84f0194900c78839df817e76 Mon Sep 17 00:00:00 2001 From: Dalibor Pospisil Date: Sat, 24 Feb 2018 22:30:38 +0100 Subject: [PATCH] reworked build and update scripts --- build-chain | 10 ++++++++-- supported-releases | 6 ++++++ update-chain | 11 +++++++++-- 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 supported-releases diff --git a/build-chain b/build-chain index 120f626..5ce3b93 100755 --- a/build-chain +++ b/build-chain @@ -1,5 +1,11 @@ #!/bin/bash +first_branch=$(head -n 1 supported-releases) +current_branch=$(git rev-parse --abbrev-ref HEAD) +next_branch=$(grep -A 1 $current_branch supported-releases | tail -n 1) +[[ "$next_branch" == "$current_branch" ]] && next_branch=$first_branch + +git merger master && \ git push && \ fedpkg build --nowait && \ -git checkout f28 && \ -exec ./build-chain +git checkout $next_branch && \ +[[ "$next_branch" != "$first_branch" ]] && exec ./build-chain diff --git a/supported-releases b/supported-releases new file mode 100644 index 0000000..3b2d398 --- /dev/null +++ b/supported-releases @@ -0,0 +1,6 @@ +master +f28 +f27 +f26 +epel7 +el6 diff --git a/update-chain b/update-chain index 6578b51..c4f7687 100755 --- a/update-chain +++ b/update-chain @@ -1,4 +1,11 @@ #!/bin/bash +first_branch=$(head -n 1 supported-releases) +current_branch=$(git rev-parse --abbrev-ref HEAD) +next_branch=$(grep -A 1 $current_branch supported-releases | tail -n 1) +[[ "$next_branch" == "$current_branch" ]] && next_branch=$first_branch + +git merge master && \ +git push && \ fedpkg update && \ -git checkout f27 && \ -exec ./update-chain +git checkout $next_branch && \ +[[ "$next_branch" != "first_branch" ]] && exec ./update-chain