Skip to content

Commit 728674a

Browse files
committed
fix: enhance version update script with before/after output
1 parent 9ebb7f3 commit 728674a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/ci-helpers/update_versions.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@ fi
99
# Assign the parameter to a variable
1010
version=$1
1111

12+
echo "Setting version to $version..."
13+
14+
# Print the original lines
15+
echo "Before:"
16+
grep "discordBotImage:" deployment/helm/values.yaml
17+
18+
# Update Chart.yaml
1219
sed -i "s/^version:.*/version: ${version}/" deployment/helm/Chart.yaml
1320
sed -i "s/^appVersion:.*/appVersion: ${version}/" deployment/helm/Chart.yaml
14-
sed -i "s|valheim-server-discord-bot:[^[:space:]]*|valheim-server-discord-bot:${version}|" deployment/helm/values.yaml
21+
22+
# Update image tag in values.yaml
23+
sed -i "s|\(discordBotImage: .*:\)[0-9]\+\.[0-9]\+\.[0-9]\+|\1${version}|" deployment/helm/values.yaml
24+
25+
# Print the result
26+
echo "After:"
27+
grep "discordBotImage:" deployment/helm/values.yaml

0 commit comments

Comments
 (0)