version: Only let `git describe` match tags beginning with a digit.

This will let us use other tags for things like `@zulip/shared`
versions.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2019-10-24 14:02:59 -07:00 committed by Tim Abbott
parent 99d34e6ade
commit 453919bbc7
2 changed files with 2 additions and 2 deletions

View File

@ -2,4 +2,4 @@
set -e
cd "$(dirname "$0")/.."
git describe --tags > zulip-git-version || true
git describe --tags --match='[0-9]*' > zulip-git-version || true

View File

@ -18,7 +18,7 @@ from version import ZULIP_VERSION
def try_git_describe() -> Optional[str]:
try: # nocoverage
return subprocess.check_output(
['git', 'describe', '--tags', '--always', '--dirty', '--long'],
['git', 'describe', '--tags', '--match=[0-9]*', '--always', '--dirty', '--long'],
stderr=subprocess.PIPE,
cwd=os.path.join(os.path.dirname(__file__), '..'),
).strip().decode('utf-8')