Skip to content

Commit

Permalink
Fix chart update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-demicev committed Jun 23, 2023
1 parent edc3e1c commit 896bc10
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/scripts/update-rancher-charts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ find ./packages/rancher-aks-operator/ -type f -exec sed -i -e "s/version: ${PREV
if [ "${REPLACE}" == "true" ]; then
sed -i -e "s/${PREV_CHART_VERSION}+up${PREV_AKS_OPERATOR_VERSION}/${NEW_CHART_VERSION}+up${NEW_AKS_OPERATOR_VERSION}/g" release.yaml
else
sed -i -e "s/${PREV_CHART_VERSION}+up${PREV_AKS_OPERATOR_VERSION}/${PREV_CHART_VERSION}+up${PREV_AKS_OPERATOR_VERSION}\n${NEW_CHART_VERSION}+up${NEW_AKS_OPERATOR_VERSION}/g" release.yaml
if grep -qv "rancher-aks-operator:" release.yaml; then
sed -i -e "s/${PREV_CHART_VERSION}+up${PREV_AKS_OPERATOR_VERSION}/${PREV_CHART_VERSION}+up${PREV_AKS_OPERATOR_VERSION}\n - ${NEW_CHART_VERSION}+up${NEW_AKS_OPERATOR_VERSION}/g" release.yaml
isChartPresent=$(cat release.yaml | grep -c "rancher-aks-operator:")
if [ $isChartPresent -eq 0 ]; then

cat <<< "rancher-aks-operator:
- ${PREV_CHART_VERSION}+up${PREV_AKS_OPERATOR_VERSION}
Expand Down

0 comments on commit 896bc10

Please sign in to comment.