diff options
Diffstat (limited to 'bin/build-snapshot')
-rwxr-xr-x | bin/build-snapshot | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/build-snapshot b/bin/build-snapshot index 18777a5..651edd7 100755 --- a/bin/build-snapshot +++ b/bin/build-snapshot | |||
@@ -42,11 +42,14 @@ create_snapshot() | |||
42 | version=$(git describe --abbrev=4 'HEAD' | sed 's/release-//') | 42 | version=$(git describe --abbrev=4 'HEAD' | sed 's/release-//') |
43 | tarball="nagios-plugins-$version.tar.gz" | 43 | tarball="nagios-plugins-$version.tar.gz" |
44 | symlink="nagios-plugins-$branch.tar.gz" | 44 | symlink="nagios-plugins-$branch.tar.gz" |
45 | make_dist "$version" | ||
46 | cp "$tarball" "$snapshot_dir" | ||
47 | git reset --quiet --hard | ||
48 | git clean --quiet --force -d -x | ||
49 | 45 | ||
46 | if [ ! -e "$snapshot_dir/$tarball" ] | ||
47 | then | ||
48 | make_dist "$version" | ||
49 | cp "$tarball" "$snapshot_dir" | ||
50 | git reset --quiet --hard | ||
51 | git clean --quiet --force -d -x | ||
52 | fi | ||
50 | cd "$snapshot_dir" | 53 | cd "$snapshot_dir" |
51 | test -e "$tarball.sha1" || shasum -a 1 -b "$tarball" >"$tarball.sha1" | 54 | test -e "$tarball.sha1" || shasum -a 1 -b "$tarball" >"$tarball.sha1" |
52 | ln -s -f "$tarball" "$symlink" | 55 | ln -s -f "$tarball" "$symlink" |