Skip to content

Commit

Permalink
Add n and sha prefix to build info
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Dec 17, 2019
1 parent 4386fba commit 14f44dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chartpress.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@ def _get_identifier(tag, n_commits, commit, long):
if "-" in tag:
# append a pre-release tag, with a . separator
# 0.1.2-alpha.1 -> 0.1.2-alpha.1.n.sha
return f"{tag}.{n_commits:03d}.{commit}"
return f"{tag}.n{n_commits:03d}.sha{commit}"
else:
# append a release tag, with a - separator
# 0.1.2 -> 0.1.2-n.sha
return f"{tag}-{n_commits:03d}.{commit}"
return f"{tag}-n{n_commits:03d}.sha{commit}"
else:
return f"{tag}"

Expand All @@ -289,7 +289,7 @@ def _strip_identifiers_build_suffix(identifier):
# split away our custom build specification: something ending in either
# . or - followed by three or more digits, a dot, an commit sha of four
# or more alphanumeric characters.
return re.sub(r'[-\.]\d{3,}\.\w{4,}\Z', "", identifier)
return re.sub(r'[-\.]n\d{3,}\.sha\w{4,}\Z', "", identifier)


def build_images(prefix, images, tag=None, push=False, force_push=False, chart_version=None, force_build=False, skip_build=False, long=False):
Expand Down

0 comments on commit 14f44dc

Please sign in to comment.