Skip to content

Commit 07482d3

Browse files
fix(docs): skip update-versions for prerelease tags
Address review feedback from IvanHunters on the Makefile: the upstream cozystack/cozystack tags workflow runs `make update-all` for every -rc/-beta/-alpha tag too, but update_versions.sh only accepts final vX.Y.Z tags. Gate the step on a non-prerelease RELEASE_TAG so prerelease docs-update CI runs no longer fail; trunk pins keep tracking the latest final release. Signed-off-by: Myasnikov Daniil <[email protected]>
1 parent 134667b commit 07482d3

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎Makefile‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ else
2323
BRANCH ?= main
2424
endif
2525

26+
# Non-empty when RELEASE_TAG carries a prerelease suffix (-rc.N / -beta.N /
27+
# -alpha.N). Used to skip trunk pin regeneration on prereleases — update_versions.sh
28+
# only accepts final vX.Y.Z tags, and the trunk should track the latest final release.
29+
_is_prerelease := $(findstring -,$(RELEASE_TAG))
30+
2631
# Routing: DOC_VERSION is either a real vX.Y directory (patch releases of an
2732
# already-released version) or `next` (everything else).
2833
#
@@ -150,9 +155,17 @@ update-all:
150155
# Regenerate the {{< version-pin >}} data file from upstream so the next/ trunk
151156
# never goes stale. Only the next trunk is auto-managed here; released vX.Y.yaml
152157
# files are frozen at release time by hack/release_next.sh.
158+
#
159+
# Prerelease tags are skipped: the upstream tags workflow runs `make update-all`
160+
# for every -rc/-beta/-alpha tag too, but update_versions.sh only accepts final
161+
# vX.Y.Z tags, and the trunk pins are meant to track the latest final release.
153162
update-versions:
154163
ifeq ($(DOC_VERSION),next)
164+
ifeq ($(_is_prerelease),)
155165
./hack/update_versions.sh --dest data/versions/next.yaml --branch "$(BRANCH)" $(if $(RELEASE_TAG),--cozystack-tag "$(RELEASE_TAG)")
166+
else
167+
@echo "update-versions: prerelease $(RELEASE_TAG) — skipping trunk pin refresh (pins track the latest final release)."
168+
endif
156169
else
157170
@echo "update-versions: $(DOC_VERSION) is a released version (frozen at release time) — skipping."
158171
endif

0 commit comments

Comments
 (0)