Skip to content

Commit

Permalink
Write chart_version only if latest_tag is defined
Browse files Browse the repository at this point in the history
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 helm#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 helm#171

Signed-off-by: Ferdinand Hofherr <[email protected]>
  • Loading branch information
fhofherr committed Jun 19, 2024
1 parent 653ba94 commit f5e8e29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -108,8 +111,6 @@ main() {
update_index
fi

echo "chart_version=${latest_tag}" >chart_version.txt

popd >/dev/null
}

Expand Down

0 comments on commit f5e8e29

Please sign in to comment.