Skip to content

Commit 55a0be8

Browse files
committed
PSMDB-1925 Recognize Percona's tags
(cherry picked from commit cba193b)
1 parent 574f4d8 commit 55a0be8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

buildscripts/resmokelib/multiversionconstants.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,16 @@ def generate_mongo_version_file():
3131
except CalledProcessError as exp:
3232
raise ChildProcessError("Failed to run git describe to get the latest tag") from exp
3333

34+
# Remove a tag prefix
35+
UPSTREAM_TAG_PREFIX = "r" # e.g. res = 'r5.1.0-alpha-597-g8c345c6693\n'
36+
PERCONA_TAG_PREFIX = "psmdb-" # e.g. res = 'psmdb-7.0.22-12-44-g80c7fa9d709'
37+
for p in [UPSTREAM_TAG_PREFIX, PERCONA_TAG_PREFIX]:
38+
if res.startswith(p):
39+
res = res[len(p):]
40+
break
41+
3442
# Write the current MONGO_VERSION to a data file.
3543
with open(MONGO_VERSION_YAML, 'w') as mongo_version_fh:
36-
# E.g. res = 'r5.1.0-alpha-597-g8c345c6693\n'
37-
res = res[1:] # Remove the leading "r" character.
3844
mongo_version_fh.write("mongo_version: " + res)
3945

4046

0 commit comments

Comments
 (0)