Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions buildscripts/resmokelib/multiversionconstants.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,16 @@ def generate_mongo_version_file():
except CalledProcessError as exp:
raise ChildProcessError("Failed to run git describe to get the latest tag") from exp

# Remove a tag prefix
UPSTREAM_TAG_PREFIX = "r" # e.g. res = 'r5.1.0-alpha-597-g8c345c6693\n'
PERCONA_TAG_PREFIX = "psmdb-" # e.g. res = 'psmdb-7.0.22-12-44-g80c7fa9d709'
for p in [UPSTREAM_TAG_PREFIX, PERCONA_TAG_PREFIX]:
if res.startswith(p):
res = res[len(p) :]
break

# Write the current MONGO_VERSION to a data file.
with open(_config.MONGO_VERSION_FILE, "w") as mongo_version_fh:
# E.g. res = 'r5.1.0-alpha-597-g8c345c6693\n'
res = res[1:] # Remove the leading "r" character.
mongo_version_fh.write("mongo_version: " + res)


Expand Down