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

+5 -5
View File
@@ -2,10 +2,10 @@
#
# Publishes the mod API (dev.overlord.zomboidforge:api), the mod tools (mod-tools), and the
# Gradle plugin (dev.overlord.zomboidforge.mod) to the Maven registry of the ZomboidForge Gitea,
# in the version of the newest v* git tag reachable from HEAD, without the "v".
# in the version of the v* git tag on HEAD, without the "v".
#
# A pre-release version (containing "-", e.g. 0.3.0-rc.1) is built and tested but never
# published. Without any v* tag nothing is published.
# published. Without a v* tag on HEAD nothing is published.
#
# Environment:
# ORG_GRADLE_PROJECT_giteaUsername Gitea user with package write access
@@ -31,11 +31,11 @@ log() {
echo "[publish] $*" >&2
}
# Prints the newest v* tag reachable from HEAD without its "v", or nothing.
# Prints the v* tag on HEAD without its "v", or nothing.
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}"
fi
}
@@ -69,7 +69,7 @@ main() {
version="$(release_tag_version)"
if [[ -z "${version}" ]]; then
log "No v* git tag found (shallow clone without tags?); nothing to publish."
log "HEAD has no v* git tag (not a release commit, or a shallow clone without tags?); nothing to publish."
exit 1
fi
if [[ "${version}" == *-* ]]; then