Skip to content

Commit

Permalink
Update ghcr.io/hassio-addons/base-python
Browse files Browse the repository at this point in the history
  • Loading branch information
FaserF committed Feb 18, 2025
1 parent 1c0866e commit 2d97044
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/Bump-Addon-Version-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: "Retrieve version & increment it"
id: version
run: |
set -e # Kill script directly on error
set -e
echo "Starting version increment process..."
configFiles=$(find . -name 'config.yaml' -print0 | xargs -r0 echo)
if [[ -z "$configFiles" ]]; then
Expand Down Expand Up @@ -57,10 +57,14 @@ jobs:
((patch++))
NEW_VERSION="$major.$minor.$patch"
echo "🔹 Updating $configfile from $OLD_VERSION to $NEW_VERSION"
sed -i "s/version: $OLD_VERSION/version: $NEW_VERSION/g" "$configfile" || {
echo "❌ Error: Failed to update version in $configfile";
exit 1;
}
sed -i.bak -E "s/^[[:space:]]*version:[[:space:]]+$OLD_VERSION/ version: $NEW_VERSION/" "$configfile"
NEW_VERSION_CHECK=$(grep -E '^[[:space:]]*version:[[:space:]]+[0-9]+\.[0-9]+\.[0-9]+' "$configfile" | head -1 | awk '{print $2}')
if [[ "$NEW_VERSION_CHECK" != "$NEW_VERSION" ]]; then
echo "❌ Error: Version update failed in $configfile!"
echo "🔍 File content after attempt:"
cat "$configfile"
exit 1
fi
echo "✅ Successfully updated $configfile to version $NEW_VERSION"
done
echo "🎉 Version increment process completed successfully!"
Expand Down

0 comments on commit 2d97044

Please sign in to comment.