diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2015-10-12 11:36:56 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2015-10-12 11:36:56 (GMT) |
commit | 3db39d3c759f0fbcc73f68fe832d90fd3f8f9821 (patch) | |
tree | 6d4b9bff2175f727d2f6aa9026ac5bb21208e18f /bin | |
parent | 7055a8e4bd3653d2cf3faf042f45d5900fab3f13 (diff) | |
download | site-3db39d3c759f0fbcc73f68fe832d90fd3f8f9821.tar.gz |
Also build snapshots of "maint-x.y" branches
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/build-snapshots | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/build-snapshots b/bin/build-snapshots index 735aa16..63bfabc 100755 --- a/bin/build-snapshots +++ b/bin/build-snapshots | |||
@@ -21,7 +21,6 @@ prefix='/home/plugins' | |||
21 | keep_days=2 | 21 | keep_days=2 |
22 | snapshot_dir="$prefix/web/download/snapshot" | 22 | snapshot_dir="$prefix/web/download/snapshot" |
23 | repository="$prefix/repositories/monitoring-plugins.git" | 23 | repository="$prefix/repositories/monitoring-plugins.git" |
24 | branches=${*:-'master pu'} | ||
25 | myself=${0##*/} | 24 | myself=${0##*/} |
26 | 25 | ||
27 | make_dist() | 26 | make_dist() |
@@ -102,6 +101,14 @@ src_dir="$temp_dir/src" | |||
102 | git clone --quiet --shared --no-checkout "$repository" "$src_dir" | 101 | git clone --quiet --shared --no-checkout "$repository" "$src_dir" |
103 | cd "$src_dir" | 102 | cd "$src_dir" |
104 | 103 | ||
104 | if [ $# -gt 0 ] | ||
105 | then | ||
106 | branches=$* | ||
107 | else | ||
108 | branches=$(git --git-dir="$repository" show-ref \ | ||
109 | | awk -F '/' '/refs\/heads\/(master|maint|pu)/ {print $NF}') | ||
110 | fi | ||
111 | |||
105 | for branch in $branches | 112 | for branch in $branches |
106 | do | 113 | do |
107 | git show-ref --verify "refs/remotes/origin/$branch" \ | 114 | git show-ref --verify "refs/remotes/origin/$branch" \ |