Skip to content

Commit

Permalink
Reset Chart.yaml's version to a valid value
Browse files Browse the repository at this point in the history
If we reset this value to something else than a valid SemVer 2 version
string, then helm lint on the chart would fail.
  • Loading branch information
consideRatio committed Oct 17, 2019
1 parent 9d2c6a0 commit af1d71d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ charts:
# the prefix to use for built images
imagePrefix: jupyterhub/k8s-
# tag to use when resetting the chart values
# with --reset command-line option (defaults to "set-by-chartpress")
# with --reset flag (defaults to "set-by-chartpress")
resetTag: latest
# version to use when resetting the Chart.yaml's version field with the
# --reset flag. It defaults to "0.0.1-set.by.chartpress". This is a valid
# SemVer 2 version, which is required for a helm lint command to succeed.
resetVersion: 1.2.3
# the git repo whose gh-pages contains the charts
repo:
git: jupyterhub/helm-chart
Expand Down
2 changes: 1 addition & 1 deletion chartpress.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def main():
# requirement on the version field.
chart_version = chart_version.lstrip('v')
if args.reset:
chart_version = chart.get('resetTag', 'set-by-chartpress')
chart_version = chart.get('resetVersion', '0.0.1-set.by.chartpress')
chart_version = build_chart(chart['name'], paths=chart_paths, version=chart_version)

if 'images' in chart:
Expand Down

0 comments on commit af1d71d

Please sign in to comment.