Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/codechecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
- uses: actions/checkout@v6
with:
# Required so the bot can push changes back
fetch-depth: 0
fetch-depth: 0
# Check out the real branch (not the detached pull_request merge ref)
# so git-auto-commit can commit the ruff fixes onto it.
ref: ${{ github.head_ref || github.ref_name }}

- uses: actions/setup-python@v6
with:
Expand Down
29 changes: 9 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Detect integration
id: integration
Expand All @@ -27,30 +25,21 @@ jobs:

echo "Detected integration: $INTEGRATION"

- name: Update manifest version
- name: Verify manifest version matches the tag
run: |
VERSION=${GITHUB_REF_NAME#v}
INTEGRATION=${{ steps.integration.outputs.integration }}

sudo apt-get update
sudo apt-get install -y jq

MANIFEST="custom_components/$INTEGRATION/manifest.json"

tmp=$(mktemp)
TAG_VERSION=${GITHUB_REF_NAME#v}
MANIFEST_VERSION=$(jq -r '.version' "$MANIFEST")

jq --arg version "$VERSION" \
'.version = $version' \
"$MANIFEST" > "$tmp"
echo "tag: $GITHUB_REF_NAME -> $TAG_VERSION"
echo "manifest: $MANIFEST_VERSION"

mv "$tmp" "$MANIFEST"

- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "Bump manifest version to ${{ github.ref_name }} [skip ci]"
file_pattern: "custom_components/**/manifest.json"
branch: main
if [ "$TAG_VERSION" != "$MANIFEST_VERSION" ]; then
echo "::error::Release tag $GITHUB_REF_NAME does not match $MANIFEST version $MANIFEST_VERSION. Bump manifest.json in a commit and tag that commit."
exit 1
fi

- name: Create ZIP
run: |
Expand Down
2 changes: 1 addition & 1 deletion custom_components/pfsense/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"requirements": [
"mac-vendor-lookup>=0.1.11"
],
"version": "0.9.1"
"version": "0.9.3"
}
Loading