mirror of https://github.com/zulip/zulip.git
release: Parse version.py using the language it was written in.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
6f4d4eebe8
commit
cd4052cf8a
|
@ -76,10 +76,7 @@ expected_date="$(TZ=America/Los_Angeles date +%F)"
|
|||
|| fail "Date in docs/overview/changelog.md does not match '$expected_date'"
|
||||
|
||||
extract_version() {
|
||||
setting="$1"
|
||||
value=$(SETTING="$setting" perl -nle 'print $2 if /$ENV{SETTING} = (\"?)([^"]+)\1$/' version.py | head -n1)
|
||||
[ -n "$value" ] || fail "Could not find $setting in version.py"
|
||||
echo "$value"
|
||||
python3 -c 'import sys, version; print(getattr(version, sys.argv[1]))' "$1"
|
||||
}
|
||||
|
||||
# Check ZULIP_VERSION and LATEST_RELEASE_VERSION are set appropriately
|
||||
|
|
Loading…
Reference in New Issue