Refine tag handling in CI/release workflows and publish script to use the v* tag on HEAD, improve error messaging, and update documentation for server configuration adjustments.
ci / image (42, public) (push) Successful in 3m3s

This commit is contained in:
Overlord committed 2026-10-03 01:11:44 +02:00
1 parent 67530d35e9
commit 18ff32b5ce
6 files changed
+28 -18

No files matched your search

+10 -6
View File
@@ -10,9 +10,10 @@
# <major.minor.build> is the version the branch's server jar reports, read before the full
# build (Dockerfile stage game-version, which downloads only the jar).
#
# <forge> is the newest v* git tag reachable from HEAD, without the "v" (v0.2.0 -> 0.2.0).
# A pre-release version (containing "-", e.g. 0.2.0-rc.1) is built and verified but never
# published. Without any v* tag the version is "0.0.0-prerelease".
# <forge> is the v* git tag on HEAD, without the "v" (v0.2.0 -> 0.2.0). When HEAD has no such
# tag, it is the git describe version of HEAD (0.2.0-3-g1a2b3c4: 3 commits after v0.2.0).
# A pre-release version (containing "-", e.g. 0.2.0-rc.1 or 0.2.0-3-g1a2b3c4) is built and
# verified but never published. Without any v* tag the version is "0.0.0-prerelease".
#
# Nothing is built when <forge>-pz<major.minor.build> already exists in the registry. The
# server only admits clients with the same major.minor.build, so every hotfix (42.21.1 ->
@@ -69,12 +70,15 @@ gradle_property() {
exit 1
}
# Prints the forge version: the newest v* tag reachable from HEAD without its "v",
# or nothing when the repository has no such tag.
# Prints the forge version without the "v": the v* tag on HEAD, else the git describe version
# of HEAD relative to the newest reachable v* tag (v0.2.0-3-g1a2b3c4), or nothing when the
# repository has no such tag.
release_tag_version() {
local tag
if tag="$(git -C "${REPO_ROOT}" describe --tags --abbrev=0 --match 'v*' 2> /dev/null)"; then
if tag="$(git -C "${REPO_ROOT}" describe --tags --exact-match --match 'v*' 2> /dev/null)"; then
echo "${tag#v}"
elif tag="$(git -C "${REPO_ROOT}" describe --tags --match 'v*' 2> /dev/null)"; then
echo "${tag#v}"
fi
}