From 0b2f17698e1faa9c55b957f9ef902be3199e3bd1 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 20 Nov 2013 19:44:54 +0900 Subject: [PATCH] test-rebuild.sh: check branch agrees with installation --- tests/test-rebuild.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index f7f475b..c859180 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -21,10 +21,19 @@ ARCH=$(arch) # exit 1 #fi +eval $(grep VERSION_ID /etc/os-release) +BRANCH="f$VERSION_ID" + +# maybe use BRANCH here too? if [ -n "$2" ]; then fedpkg switch-branch $2 fi +if [ "* $BRANCH" != "$(git branch --list $BRANCH" ]; then + echo "Git branch does not match Fedora installation!" + exit 1 +fi + sudo yum-builddep $PKG.spec fedpkg local