Skip to content

Commit 46cc8f8

Browse files
committed
fix(release): bump version to 1.0.2 and number pre-releases from releases
package.json was at 0.2.0 while v1.0.1 is already published, so the Pre-release workflow computed v0.2.0-pre.N behind the live release line and collided with v0.2.0-pre.1 (permanently burned in the immutable-release ledger). Bump to 1.0.2 so pre-releases lead the next patch, and derive the next pre-release number from the releases list (incl. drafts + immutable) instead of git tags, which never materialize under immutable releases.
1 parent 09bc00b commit 46cc8f8

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/prerelease.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,21 @@ jobs:
4242
id: prerelease
4343
env:
4444
BASE_VERSION: ${{ steps.version.outputs.version }}
45+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
REPO: ${{ github.repository }}
4547
run: |
46-
LATEST=$(git tag -l "v${BASE_VERSION}-pre.*" --sort=-version:refname | head -n1)
48+
# Derive the next number from existing RELEASES (incl. drafts + already
49+
# published immutable releases), NOT git tags. Under immutable releases a
50+
# pre-release tag can be permanently reserved in the release ledger while
51+
# never materializing as a git ref, so git-tag-based numbering collides on
52+
# the same number every run. The releases list always reflects burned tags.
53+
LATEST=$(gh api "repos/${REPO}/releases" --paginate \
54+
--jq ".[].tag_name | select(startswith(\"v${BASE_VERSION}-pre.\"))" \
55+
| sed "s|^v${BASE_VERSION}-pre.||" | sort -n | tail -n1)
4756
if [ -z "$LATEST" ]; then
4857
NUM=1
4958
else
50-
PREFIX="v${BASE_VERSION}-pre."
51-
NUM="${LATEST#"$PREFIX"}"
52-
NUM=$((NUM + 1))
59+
NUM=$((LATEST + 1))
5360
fi
5461
TAG="v${BASE_VERSION}-pre.${NUM}"
5562
echo "tag=$TAG" >> "$GITHUB_OUTPUT"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docker-compose-debugger",
3-
"version": "0.2.0",
3+
"version": "1.0.2",
44
"description": "Browser-based Docker Compose debugger — redacts secrets, shows service cards, and generates markdown tables for support channels",
55
"type": "module",
66
"scripts": {

0 commit comments

Comments
 (0)