Skip to content

Commit

Permalink
Strip added g prefix part of git describe's returned sha
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Oct 21, 2019
1 parent 7927c93 commit a41cb4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chartpress.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ def build_chart(name, version=None, paths=None, long=False):
try:
git_describe = check_output(['git', 'describe', '--tags', '--long', last_chart_commit]).decode('utf8').strip()
latest_tag_in_branch, n_commits, sha = git_describe.rsplit('-', maxsplit=2)
# remove the "g" prefix that is part of the git describe command
# ref: https://git-scm.com/docs/git-describe#_examples
sha = sha[1:]

n_commits = int(n_commits)
if n_commits > 0 or long:
Expand Down

0 comments on commit a41cb4d

Please sign in to comment.