summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-10-08 19:23:23 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-10-08 19:23:23 (GMT)
commite0e66852d5576558a860309dad3152cf61b1dd7c (patch)
tree8600a5b897066ea845da4140fadf126c926e1fd2 /bin
parent4240fabc23f587677cbd1cda518a6aa51e84e8d6 (diff)
downloadsite-e0e66852d5576558a860309dad3152cf61b1dd7c.tar.gz
build-snapshot: Don't forget to checkout branch
Fix the issue that the build-snapshot script failed to checkout existing branches.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-snapshot8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/build-snapshot b/bin/build-snapshot
index 5633abd..e6b4082 100755
--- a/bin/build-snapshot
+++ b/bin/build-snapshot
@@ -38,8 +38,12 @@ create_snapshot()
38 branch=$1 38 branch=$1
39 snapshot_dir=$2 39 snapshot_dir=$2
40 40
41 git show-ref --verify --quiet "refs/heads/$branch" \ 41 if git show-ref --verify --quiet "refs/heads/$branch"
42 || git checkout --quiet --track "origin/$branch" 42 then
43 git checkout --quiet "$branch"
44 else
45 git checkout --quiet --track "origin/$branch"
46 fi
43 47
44 version=$(git describe --abbrev=4 'HEAD' | sed 's/release-//') 48 version=$(git describe --abbrev=4 'HEAD' | sed 's/release-//')
45 tarball="nagios-plugins-$version.tar.gz" 49 tarball="nagios-plugins-$version.tar.gz"