Files
inbuxa-admin/tools/release-version.test.sh
jcoffey-dev 63df3d572d
ci / build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / notices (pull_request) Successful in 53s
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 2m2s
Version 27.1-rc.1: the suite's series versions
inbuxa-version.json is now 27.1-rc.1, the version the whole suite moves to.
The console shows just that: the "(base 1.0.11)" suffix named the release
the fork started from, and no upstream version is shown any more.

tools/release-version.sh holds the rule (POSIX sh, for the docker:cli
image): a release moves its series tag and :latest; a release candidate
its series' -rc tag, never :latest. Both CIs publish v27.1, v27.1.N and
v27.1-rc.N tags as well as the dated ones from before.

The weekly release cuts the next patch of the series (27.1 -> 27.1.1),
and while main is on a release candidate it says so and stops: a series
and its candidates are cut by hand.
2026-10-28 09:35:15 -07:00

25 lines
924 B
Bash
Executable File

#!/bin/sh
# SPDX-FileCopyrightText: 2026 Coffey Labs LLC
# SPDX-License-Identifier: AGPL-3.0-only
# Tests for release-version.sh: sh tools/release-version.test.sh
set -u
here=$(dirname "$0"); s="$here/release-version.sh"; fail=0
check() { # expected, then the arguments
want=$1; shift
got=$(sh "$s" "$@" 2>/dev/null | tr '\n' ' ')"rc=$(sh "$s" "$@" >/dev/null 2>&1; echo $?)"
[ "$got" = "$want" ] || { echo "FAIL: $* -> '$got', want '$want'"; fail=1; }
}
check '27.1-rc.2 27.1-rc rc=0' tags 27.1-rc.2
check '27.1 latest rc=0' tags 27.1
check '27.1.4 27.1 latest rc=0' tags 27.1.4
check 'rc=0' prerelease 27.1-rc.1
check 'rc=1' prerelease 27.1
check 'rc=0' next 27.1-rc.3
check '27.1.1 rc=0' next 27.1
check '27.1.10 rc=0' next 27.1.9
for bad in 2026.10.26.2 2026.10.26 27.1.0 27.1.0-rc.1 27.13 27.1-rc.0 27.01 v27.1 ''; do
check 'rc=2' tags "$bad"
done
[ $fail = 0 ] && echo "release-version: all passed"
exit $fail