mirror of https://github.com/zulip/zulip.git
build-release-tarball: Verify full releases are tagged and pushed.
This ensures that anything that looks like a full release will identify itself as such. It requires that the version have a tag at the current commit (though it doesn't need to be pushed yet), as well as the commits exist in `main` or a release branch in the remote.
This commit is contained in:
parent
10c6b249bd
commit
2d132bf342
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue