Skip to content

Commit f129f43

Browse files
committed
note that --tag is required with --reset after a release with useChartVersion: true
1 parent aae6a3a commit f129f43

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

chartpress.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,16 +790,23 @@ def build_chart(
790790
if "set.by.chartpress" in chart["version"]:
791791
raise ValueError(
792792
f"Chart {chart_file} has placeholder version {chart['version']}, with `useChartVersion: true`."
793-
f"Set the version in the {chart_file} to a base pre-release tag,"
794-
" e.g. `1.0.0-0.dev` or `1.0.0-alpha.1` and run chartpress again."
793+
f" Set the version in the {chart_file} to a base pre-release tag (your _next_ release),"
794+
" e.g. `2.0.0-0.dev` or `2.0.0-alpha.1` and run chartpress again."
795795
)
796796

797797
# require starting from a prerelease tag, to ensure correct ordering
798798
if "-" not in chart["version"]:
799+
if reset:
800+
raise ValueError(
801+
"--reset after a release must also specify --tag $VERSION to reset to"
802+
" when using useChartVersion: true."
803+
" This should be your _next_ pre-release version,"
804+
" e.g. `chartpress --reset --tag 1.0.1-0.dev`"
805+
)
799806
raise ValueError(
800807
f"Chart {chart_file} has non-prerelease version {chart['version']} with `useChartVersion: true`"
801-
f"Set the version in the {chart_file} to a base pre-release tag,"
802-
" e.g. `1.0.0-0.dev` or `1.0.0-alpha.1` and run chartpress again."
808+
f" Set the version in the {chart_file} to a base pre-release tag (your _next_ release),"
809+
" e.g. `2.0.0-0.dev` or `2.0.0-alpha.1` and run chartpress again."
803810
)
804811
else:
805812
base_version = None

0 commit comments

Comments
 (0)