Files
inbuxa-webmail/scripts/release-version.test.sh
T
jcoffey-dev 76ee66f106
ci / node (pull_request) Skipped
ci / version (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 2m42s
ci / docker-build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / announce (pull_request) Skipped
Number the webmail with the suite: 27.1-rc.1
The webmail moves from dated versions (2026.10.26+gcff6f1f) to the INBUXA
suite's release numbers: 27.1 for a series, 27.1.3 for a patch, 27.1-rc.1
for a release candidate.

- VERSION names the release main is working towards. The commit tagged
  inbuxa-v<VERSION> reports it bare; every other build adds +pr<N> or
  +g<sha>, so a build between releases never passes for the release.
- Gitea's merge subject ("Merge pull request 'Title' (#76) from ...") is
  now recognised. The dated scheme only knew GitHub's form, so every
  Gitea merge went out as +g<sha>.
- CI publishes a release candidate as a pre-release, tagged 27.1-rc.N and
  27.1-rc, never latest; a release moves its own tag, its series and
  latest (scripts/release-version.sh, the console's helper). The GHCR
  copy follows the same tags.
- deploy.example.sh does the same sum in shell, and still names a pre-27.1
  tree by its date, so a rollback reports what it reported then.
- About explains the new form; the text is retranslated in all ten
  catalogs.

Claude-Session: https://claude.ai/code/session_01Y2F7CWRXorttf5sjSbxwpj
2026-10-28 09:46:10 -07:00

21 lines
792 B
Bash
Executable File

#!/bin/sh
# Tests for release-version.sh: sh scripts/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=2' next 27.1
for bad in 2026.10.26-gcff6f1f 2026.10.26 27.1.0 27.1.0-rc.1 27.13 27.1-rc.0 27.01 27.1-rc.1+pr76 v27.1 ''; do
check 'rc=2' tags "$bad"
done
[ $fail = 0 ] && echo "release-version: all passed"
exit $fail