Skip to content

Commit 995a4b7

Browse files
committed
fix deprecate past releases script
1 parent f97189a commit 995a4b7

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/deprecate-past-releases.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Node.js
1818
uses: actions/setup-node@v6
1919
with:
20-
node-version: 24
20+
node-version: 24.x
2121
registry-url: https://registry.npmjs.org/
2222

2323
- name: Update npm to latest version
@@ -89,12 +89,14 @@ jobs:
8989
9090
gh release list --limit 100 --json tagName --jq '.[] | select(.tagName | test("-"; "i")) | .tagName' | while read -r TAG; do
9191
BASE_VERSION="${TAG%%-*}"
92+
# Remove 'v' prefix if present for version comparison
93+
BASE_VERSION_NO_V="${BASE_VERSION#v}"
9294
93-
if [ "$(printf "%s\n%s" "$BASE_VERSION" "$LATEST_VERSION" | sort -V | tail -n1)" == "$LATEST_VERSION" ]; then
94-
echo "Deleting GitHub release: $TAG (base version: $BASE_VERSION)"
95+
if [ "$(printf "%s\n%s" "$BASE_VERSION_NO_V" "$LATEST_VERSION" | sort -V | tail -n1)" == "$LATEST_VERSION" ]; then
96+
echo "Deleting GitHub release: $TAG (base version: $BASE_VERSION_NO_V)"
9597
gh release delete "$TAG" --yes
9698
else
97-
echo "Skipping GitHub release: $TAG (base version: $BASE_VERSION is newer than $LATEST_VERSION)"
99+
echo "Skipping GitHub release: $TAG (base version: $BASE_VERSION_NO_V is newer than $LATEST_VERSION)"
98100
fi
99101
done
100102
env:
@@ -110,12 +112,14 @@ jobs:
110112
echo "Finding pre-release tags with a hyphen in the name..."
111113
git tag -l "*-*" | while read -r TAG; do
112114
BASE_VERSION="${TAG%%-*}"
115+
# Remove 'v' prefix if present for version comparison
116+
BASE_VERSION_NO_V="${BASE_VERSION#v}"
113117
114-
if [ "$(printf "%s\n%s" "$BASE_VERSION" "$LATEST_VERSION" | sort -V | tail -n1)" == "$LATEST_VERSION" ]; then
115-
echo "Deleting tag: $TAG (base version: $BASE_VERSION)"
118+
if [ "$(printf "%s\n%s" "$BASE_VERSION_NO_V" "$LATEST_VERSION" | sort -V | tail -n1)" == "$LATEST_VERSION" ]; then
119+
echo "Deleting tag: $TAG (base version: $BASE_VERSION_NO_V)"
116120
git push origin ":refs/tags/$TAG"
117121
else
118-
echo "Skipping tag: $TAG (base version: $BASE_VERSION is newer than $LATEST_VERSION)"
122+
echo "Skipping tag: $TAG (base version: $BASE_VERSION_NO_V is newer than $LATEST_VERSION)"
119123
fi
120124
done
121125
env:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ All notable changes to `@homebridge-plugins/homebridge-govee` will be documented
1212
- `H601F`, `H60B0`, `H8066`, `H8076`, `H80A1`
1313
- updated dependencies + lint rules
1414
- update workflow action versions
15+
- fix deprecate past releases script
1516

1617
## v11.14.0 (2025-12-28)
1718

0 commit comments

Comments
 (0)