File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments