mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
version: Show number of commits and commit sha in ZULIP_VERSION.
We use `git describe --tags` to get information about the number of commit since the last major version, and the sha of the current HEAD. This is added to the ZULIP_VERSION when a deploy is done from `git`. Modified heavily by punchagan to: * to use git describe instead of `git log` and `wc` * use a separate script to run the git describe command * write the file with version info to var/ and remove it from the repo Fixes #4685.
This commit is contained in:
@@ -62,6 +62,11 @@ cd "$BASEDIR"
|
||||
|
||||
# Check out a temporary full copy of the index to generate static files
|
||||
git checkout-index -f -a --prefix "$TMPDIR/$prefix/"
|
||||
|
||||
# Add the git version information file
|
||||
./tools/cache-zulip-git-version
|
||||
mv zulip-git-version "$TMPDIR/$prefix/"
|
||||
|
||||
cd "$TMPDIR/$prefix"
|
||||
|
||||
# create var/log directory in the new temporary checkout
|
||||
@@ -109,7 +114,7 @@ echo "$version" > version
|
||||
|
||||
cd "$TMPDIR"
|
||||
|
||||
tar --append -f "$TARBALL" "$prefix/prod-static" "$prefix/build_id" "$prefix/version" "$prefix/staticfiles.json" "$prefix/templates/zerver/emails/compiled" "$prefix/webpack-stats-production.json"
|
||||
tar --append -f "$TARBALL" "$prefix/prod-static" "$prefix/build_id" "$prefix/version" "$prefix/zulip-git-version" "$prefix/staticfiles.json" "$prefix/templates/zerver/emails/compiled" "$prefix/webpack-stats-production.json"
|
||||
|
||||
rm -rf "$prefix"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user