From f5e8e2956030ad9746f7e20ff189b0edd0ad3468 Mon Sep 17 00:00:00 2001 From: Ferdinand Hofherr Date: Wed, 19 Jun 2024 14:02:36 +0200 Subject: [PATCH] Write chart_version only if latest_tag is defined The chart_version output was written regardless of whether the latest_tag variable was defined. The latest_tag variable is only defined if skip_packaging is not set. This leads to issue #171. Setting skip_packaging implies that an external process takes care of packaging the chart and setting the chart version. There is thus no need to write the chart_version output as it should already be known. Closes #171 Signed-off-by: Ferdinand Hofherr --- cr.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cr.sh b/cr.sh index 4897b65..9a545e7 100755 --- a/cr.sh +++ b/cr.sh @@ -96,9 +96,12 @@ main() { IFS=, echo "${changed_charts[*]}" )" >changed_charts.txt + + echo "chart_version=${latest_tag}" >chart_version.txt else echo "Nothing to do. No chart changes detected." echo "changed_charts=" >changed_charts.txt + echo "chart_version=" >chart_version.txt fi else install_chart_releaser @@ -108,8 +111,6 @@ main() { update_index fi - echo "chart_version=${latest_tag}" >chart_version.txt - popd >/dev/null }