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:
ppreethi
2019-04-20 23:51:20 -04:00
committed by Tim Abbott
parent 8261c394b9
commit 86840adda5
5 changed files with 24 additions and 1 deletions

View File

@@ -120,6 +120,8 @@ elif args.from_git:
subprocess.check_call(["./tools/update-prod-static", "--authors-not-required", "--prev-deploy",
os.path.join(DEPLOYMENTS_DIR, 'current')],
preexec_fn=su_to_zulip)
logging.info("Caching zulip git version...")
subprocess.check_call(["./tools/cache-zulip-git-version"], preexec_fn=su_to_zulip)
else:
# Since this doesn't do any actual work, it's likely safe to have
# this run before we apply puppet changes (saving a bit of downtime).