We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9a7d03d + 283f150 commit b30710eCopy full SHA for b30710e
docs/source/conf.py
@@ -37,13 +37,14 @@ def setup(app):
37
def _get_git_ref_from_chartpress_based_version(version):
38
"""
39
Get a git ref from a chartpress set version of format like
40
- 1.2.3-beta.1.n123.h1234567, 1.2.3-n123.h1234567, or 1.2.3.
+ - 2.0.1-0.dev.git.5810.hf475e7a4 return git hash
41
+ - 2.0.0-beta.1 return tag
42
+ - 2.0.0 return tag
43
- tag_hash_split = re.split(r"[\.|-]n\d\d\d\.h", version)
- if len(tag_hash_split) == 2:
44
- return tag_hash_split[1]
45
- else:
46
- return tag_hash_split[0]
+ m = re.match(r"\d+\.\d+\.\d+(-.+\.h([0-9a-f]+))$", version)
+ if m:
+ return m.group(2)
47
+ return version
48
49
50
# FIXME: Stop relying on chartpress to modify Chart.yaml (and values.yaml) by
0 commit comments