Skip to content

Commit

Permalink
fix release script for helm (#4810)
Browse files Browse the repository at this point in the history
Signed-off-by: Haywood Shannon <[email protected]>
  • Loading branch information
haywoodsh authored Dec 18, 2023
1 parent ff9c6b8 commit c05429a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/scripts/release-version-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ echo "Updating versions: "
echo "ic_version: ${current_ic_version} -> ${ic_version}"
echo "helm_chart_version: ${current_helm_chart_version} -> ${helm_chart_version}"

regex_ic="s#$current_ic_version#$ic_version#g"
regex_helm="s#$current_helm_chart_version#$helm_chart_version#g"

mv "${HELM_CHART_PATH}/values.schema.json" "${TMPDIR}/"
jq --arg version "${ic_version}" \
'.properties.controller.properties.image.properties.tag.default = $version | .properties.controller.properties.image.properties.tag.examples[0] = $version | .properties.controller.examples[0].image.tag = $version | .properties.controller.properties.image.examples[0].tag = $version | .examples[0].controller.image.tag = $version' \
Expand All @@ -74,8 +77,7 @@ for i in "${FILES_TO_UPDATE_IC_VERSION[@]}"; do
fi
file_name=$(basename "${i}")
mv "${i}" "${TMPDIR}/${file_name}"
regex="s#$current_ic_version#$ic_version#g"
cat "${TMPDIR}/${file_name}" | sed -e "$regex" > "${i}"
cat "${TMPDIR}/${file_name}" | sed -e "$regex_ic" > "${i}"
if [ $? -ne 0 ]; then
echo "ERROR: failed processing ${i}"
mv "${TMPDIR}/${file_name}" "${i}"
Expand All @@ -90,8 +92,7 @@ for i in "${FILE_TO_UPDATE_HELM_CHART_VERSION[@]}"; do
fi
file_name=$(basename "${i}")
mv "${i}" "${TMPDIR}/${file_name}"
regex="s#$current_ic_version#$ic_version#g"
cat "${TMPDIR}/${file_name}" | sed -e "$regex" > "${i}"
cat "${TMPDIR}/${file_name}" | sed -e "$regex_helm" > "${i}"
if [ $? -ne 0 ]; then
echo "ERROR: failed processing ${i}"
mv "${TMPDIR}/${file_name}" "${i}"
Expand All @@ -107,8 +108,7 @@ for i in ${docs_files}; do
fi
file_name=$(basename "${i}")
mv "${i}" "${TMPDIR}/${file_name}"
regex="s#$current_ic_version#$ic_version#g"
cat "${TMPDIR}/${file_name}" | sed -e "$regex" > "${i}"
cat "${TMPDIR}/${file_name}" | sed -e "$regex_ic" | sed -e "$regex_helm" > "${i}"
if [ $? -ne 0 ]; then
echo "ERROR: failed processing ${i}"
mv "${TMPDIR}/${file_name}" "${i}"
Expand Down

0 comments on commit c05429a

Please sign in to comment.