Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

build-release-tarball: Verify full releases are tagged and pushed.

Alex Vandiver2d132bf342e3
diff --git a/tools/build-release-tarball b/tools/build-release-tarball
index c8e81085d31..4ff4887ddc7 100755
--- a/tools/build-release-tarball
+++ b/tools/build-release-tarball
@@ -62,6 +62,19 @@ git checkout-index -f -a --prefix "$TMPDIR/$prefix/"
# Add the Git version information file
./tools/cache-zulip-git-version
+if [[ "$version" =~ ^[0-9]+\.[0-9]+$ ]]; then
+ generated_version=$(head -n1 zulip-git-version)
+ base_version=$(head -n2 zulip-git-version | tail -n1)
+ if [ "$generated_version" != "$version" ]; then
+ echo "Version $version looks like a release version, but is not tagged yet! Got $generated_version"
+ exit 1
+ fi
+ if [ "$base_version" != "$version" ]; then
+ remote="$(git config zulip.zulipRemote)" || remote=upstream
+ echo "Commit for $version have not been pushed to remote $remote -- 'branched from' reports $base_version, not $version"
+ exit 1
+ fi
+fi
mv zulip-git-version "$TMPDIR/$prefix/"
cd "$TMPDIR/$prefix"