From 3e001cb8c68933439c7e721650f20a07a1a5c61e Mon Sep 17 00:00:00 2001 From: Ferdinand Hofherr Date: Mon, 20 Jan 2025 12:34:35 +0100 Subject: [PATCH] Write chart_version only if latest_tag is defined (#202) 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 861047b..c0fcc73 100755 --- a/cr.sh +++ b/cr.sh @@ -98,9 +98,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 @@ -110,8 +113,6 @@ main() { update_index fi - echo "chart_version=${latest_tag}" >chart_version.txt - popd >/dev/null }