From bc28305f0c6cd390566ea0b96097ae9680dfcb2b Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Thu, 17 Oct 2019 19:36:31 +0200 Subject: [PATCH] Reset Chart.yaml's version to a valid value If we reset this value to something else than a valid SemVer 2 version string, then helm lint on the chart would fail. --- README.md | 6 +++++- chartpress.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 88a8d50..48fd4ea 100644 --- a/README.md +++ b/README.md @@ -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 the --reset flag. It 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 diff --git a/chartpress.py b/chartpress.py index e48506f..36ba905 100755 --- a/chartpress.py +++ b/chartpress.py @@ -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: