Skip to content

Commit 21aad07

Browse files
authored
Merge pull request #152 from minrk/reset-tag
accept --tag arg in --reset
2 parents a74691b + 46fad2e commit 21aad07

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

chartpress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ def main(args=None):
10031003
forced_version = None
10041004
if args.tag:
10051005
forced_version = args.tag
1006-
if args.reset:
1006+
elif args.reset:
10071007
forced_version = chart.get("resetVersion", "0.0.1-set.by.chartpress")
10081008

10091009
if not args.list_images:

tests/test_repo_interactions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ def test_chartpress_run(git_repo, capfd):
5555
in out
5656
)
5757

58+
# --tag overrides resetVersion config
59+
out = _capture_output(["--reset", "--tag=1.0.0-dev"], capfd)
60+
assert "Updating testchart/Chart.yaml: version: 1.0.0-dev" in out
61+
5862
# verify that we don't need to rebuild the image
5963
out = _capture_output([], capfd)
6064
assert f"Skipping build" in out

0 commit comments

Comments
 (0)