diff --git a/.gitea/workflows/announce.yml b/.gitea/workflows/announce.yml index 89c4969..efb2eb1 100644 --- a/.gitea/workflows/announce.yml +++ b/.gitea/workflows/announce.yml @@ -12,7 +12,7 @@ on: workflow_dispatch: inputs: tag: - description: release tag to announce, e.g. inbuxa-v2026.10.5-g17a8093 + description: release tag to announce, e.g. inbuxa-v27.1-rc.1 required: true jobs: diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index ae2f6db..9373ca1 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -15,14 +15,16 @@ # If GitHub is ever unavailable, unsetting BUILD_ON here is the whole # fallback: the jobs below take over again unchanged. # -# Releases are cut by pushing a tag named `inbuxa-v`, where -# is what scripts/version.mjs says for the tagged commit with the -# `+` turned into `-` (e.g. inbuxa-v2026.9.22-g1a2b3c4). The prefix matters: +# Releases are cut by pushing a tag named `inbuxa-v`, where VERSION +# is the file at the root: the suite's release number, e.g. inbuxa-v27.1-rc.1 +# or inbuxa-v27.1.3. A release candidate is published as a pre-release and +# tagged `27.1-rc.1` and `27.1-rc`, never `latest`; a release moves its own +# tag, its series and `latest` (scripts/release-version.sh). The prefix matters: # this repository carries upstream ihasmail's own `v...` tags, on commits it # shares with upstream, and a publish keyed on `v*` would ship plain ihasmail # under the INBUXA name the moment one arrived. Only `inbuxa-v` tags publish. -# A tag publishes only if it names its own commit's version and that commit is -# on main. There is no release schedule yet; tags are cut by hand. +# A tag publishes only if it names its own commit's VERSION and that commit is +# on main. There is no release schedule; tags are cut by hand. # Every job runs in an image pinned by digest (tag in the trailing comment), # and the only action used is coffey-labs/actions/checkout pinned by SHA. The @@ -80,6 +82,7 @@ jobs: - run: su node -p -c "npm ci --ignore-scripts" - run: su node -p -c "npm run typecheck" - run: su node -p -c "npm test" + - run: sh scripts/release-version.test.sh - run: su node -p -c "npm run build" # ------------------------------------------------------------- build ------ @@ -113,7 +116,8 @@ jobs: image: node:26-bookworm-slim@sha256:582460f614631b59b824ac6020533b9bf339c7fdf3a6d7db31abb6b4065f0212 # 26-bookworm-slim outputs: version: ${{ steps.v.outputs.VERSION }} - docker_tag: ${{ steps.v.outputs.DOCKER_TAG }} + tags: ${{ steps.v.outputs.TAGS }} + prerelease: ${{ steps.v.outputs.PRERELEASE }} steps: - uses: coffey-labs/actions/checkout@fab0c4d45e0162963965f1555df27b7bed5e20ec with: @@ -124,14 +128,19 @@ jobs: TAG: ${{ github.ref_name }} run: | set -euo pipefail + R="$(cat VERSION)" + [ "$TAG" = "inbuxa-v$R" ] || { echo "!! $TAG does not name this commit's VERSION; expected inbuxa-v$R"; exit 1; } + # version.mjs reports VERSION bare only on the commit tagged with it. V="$(node scripts/version.mjs)" - want="inbuxa-v${V/+/-}" - [ "$TAG" = "$want" ] || { echo "!! $TAG does not name this commit's version; expected $want"; exit 1; } + [ "$V" = "$R" ] || { echo "!! version.mjs says $V for $TAG, not $R"; exit 1; } git merge-base --is-ancestor "$(git rev-parse "${TAG}^{commit}")" origin/main \ || { echo "!! $TAG is not on main"; exit 1; } + TAGS="$(sh scripts/release-version.sh tags "$V" | tr '\n' ' ')" + if sh scripts/release-version.sh prerelease "$V"; then P=true; else P=false; fi echo "VERSION=$V" >> "$GITHUB_OUTPUT" - echo "DOCKER_TAG=${V/+/-}" >> "$GITHUB_OUTPUT" - echo "VERSION=$V DOCKER_TAG=${V/+/-}" + echo "TAGS=$TAGS" >> "$GITHUB_OUTPUT" + echo "PRERELEASE=$P" >> "$GITHUB_OUTPUT" + echo "VERSION=$V TAGS=$TAGS PRERELEASE=$P" # Multi-arch image at /inbuxa/inbuxa-webmail, then the release. # arm64 is built under QEMU on this amd64 host, which is slow but fine for @@ -151,12 +160,13 @@ jobs: REGISTRY: ${{ vars.REGISTRY }} IMAGE: ${{ vars.REGISTRY }}/${{ github.repository }} VERSION: ${{ needs.version.outputs.version }} - DOCKER_TAG: ${{ needs.version.outputs.docker_tag }} + TAGS: ${{ needs.version.outputs.tags }} + PRERELEASE: ${{ needs.version.outputs.prerelease }} PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} steps: - uses: coffey-labs/actions/checkout@fab0c4d45e0162963965f1555df27b7bed5e20ec - run: | - test -n "$REGISTRY" && test -n "$VERSION" && test -n "$DOCKER_TAG" + test -n "$REGISTRY" && test -n "$VERSION" && test -n "$TAGS" test -n "$PACKAGE_TOKEN" || { echo "PACKAGE_TOKEN secret is not set on this repository" >&2; exit 1; } echo "$PACKAGE_TOKEN" | docker login -u jcoffey-dev --password-stdin "$REGISTRY" docker run --privileged --rm tonistiigi/binfmt --install arm64 @@ -166,10 +176,9 @@ jobs: --platform linux/amd64,linux/arm64 \ --build-arg IHASMAIL_VERSION="$VERSION" \ --provenance=false --sbom=false \ - --tag "$IMAGE:$DOCKER_TAG" \ - --tag "$IMAGE:latest" \ + $(for t in $TAGS; do printf '%s %s:%s ' --tag "$IMAGE" "$t"; done) \ --push . - docker buildx imagetools inspect "$IMAGE:$DOCKER_TAG" + docker buildx imagetools inspect "$IMAGE:$VERSION" # Show the package on the repository's Packages tab. Idempotent. - run: | apk add --no-cache -q curl @@ -184,9 +193,10 @@ jobs: TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -eu - body="INBUXA webmail $VERSION.\n\nImage: \`$IMAGE:$DOCKER_TAG\` (linux/amd64, linux/arm64), also tagged \`latest\`." + also="$(for t in $TAGS; do [ "$t" = "$VERSION" ] || printf '`%s` ' "$t"; done)" + body="INBUXA webmail $VERSION.\n\nImage: \`$IMAGE:$VERSION\` (linux/amd64, linux/arm64), also tagged ${also% }." curl -fsS -o /dev/null -H "Authorization: token $TOKEN" -H "Content-Type: application/json" \ - --data "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"body\":\"$body\"}" \ + --data "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"body\":\"$body\",\"prerelease\":$PRERELEASE}" \ "$CI_SERVER_INTERNAL/api/v1/repos/$GITHUB_REPOSITORY/releases" echo "release $TAG created" - if: always() diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 800e4e0..a1376a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ # arrives here as an ordinary push, and the status lands on its head commit, # which is where Gitea's PR looks for it. # -# Releases are cut by pushing a tag named `inbuxa-v` (see +# Releases are cut by pushing a tag named `inbuxa-v` (see # .gitea/workflows/ci.yml for why the prefix matters: this repository carries # upstream ihasmail's own `v...` tags, and only `inbuxa-v` tags publish). # @@ -89,6 +89,7 @@ jobs: - run: npm ci --ignore-scripts - run: npm run typecheck - run: npm test + - run: sh scripts/release-version.test.sh - run: npm run build # ------------------------------------------------------------- build ------ @@ -111,7 +112,8 @@ jobs: runs-on: ubuntu-latest outputs: version: ${{ steps.v.outputs.version }} - docker_tag: ${{ steps.v.outputs.docker_tag }} + tags: ${{ steps.v.outputs.tags }} + prerelease: ${{ steps.v.outputs.prerelease }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -124,15 +126,19 @@ jobs: TAG: ${{ github.ref_name }} run: | set -euo pipefail + R="$(cat VERSION)" + [ "$TAG" = "inbuxa-v$R" ] || { echo "::error::$TAG does not name this commit's VERSION; expected inbuxa-v$R"; exit 1; } + # version.mjs reports VERSION bare only on the commit tagged with it. V="$(node scripts/version.mjs)" - want="inbuxa-v${V/+/-}" - [ "$TAG" = "$want" ] || { echo "::error::$TAG does not name this commit's version; expected $want"; exit 1; } + [ "$V" = "$R" ] || { echo "::error::version.mjs says $V for $TAG, not $R"; exit 1; } git merge-base --is-ancestor "$(git rev-parse "${TAG}^{commit}")" origin/main \ || { echo "::error::$TAG is not on main"; exit 1; } + tags="$(sh scripts/release-version.sh tags "$V" | tr '\n' ' ')" + if sh scripts/release-version.sh prerelease "$V"; then p=true; else p=false; fi echo "version=$V" >> "$GITHUB_OUTPUT" - # A Docker tag may not contain '+', so build metadata becomes '-'. - echo "docker_tag=${V/+/-}" >> "$GITHUB_OUTPUT" - echo "version $V -> tag ${V/+/-}" + echo "tags=$tags" >> "$GITHUB_OUTPUT" + echo "prerelease=$p" >> "$GITHUB_OUTPUT" + echo "version $V -> tags $tags (prerelease: $p)" # Each architecture on its own native runner, pushed as an untagged image by # digest; `publish` joins the two digests into one multi-arch tag. @@ -187,7 +193,8 @@ jobs: overwrite: true if-no-files-found: error - # Joins the digests into `:` and `:latest`, links the package to + # Joins the digests into the release's tags (`:`, plus its series + # and `:latest` for a release, `:-rc` for a candidate), links the package to # the repository on Gitea, then creates the release there -- last, so a # release on the page always has its image behind it. The release is made # with GITEA_TOKEN, a user's token, so Gitea's announce.yml fires for it; @@ -211,12 +218,14 @@ jobs: password: ${{ secrets.GITEA_TOKEN }} - name: Create the manifest env: - DOCKER_TAG: ${{ needs.version.outputs.docker_tag }} + VERSION: ${{ needs.version.outputs.version }} + TAGS: ${{ needs.version.outputs.tags }} run: | - refs=() + refs=() tags=() for f in /tmp/digests/*; do refs+=("${IMAGE}@sha256:$(basename "$f")"); done - docker buildx imagetools create -t "${IMAGE}:${DOCKER_TAG}" -t "${IMAGE}:latest" "${refs[@]}" - docker buildx imagetools inspect "${IMAGE}:${DOCKER_TAG}" + for t in $TAGS; do tags+=(-t "${IMAGE}:$t"); done + docker buildx imagetools create "${tags[@]}" "${refs[@]}" + docker buildx imagetools inspect "${IMAGE}:${VERSION}" # Shows the package on the repository's Packages tab. Idempotent. - env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} @@ -228,7 +237,8 @@ jobs: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} TAG: ${{ github.ref_name }} VERSION: ${{ needs.version.outputs.version }} - DOCKER_TAG: ${{ needs.version.outputs.docker_tag }} + TAGS: ${{ needs.version.outputs.tags }} + PRERELEASE: ${{ needs.version.outputs.prerelease }} run: | set -eu API="$GITEA_URL/api/v1/repos/$GITHUB_REPOSITORY/releases" @@ -236,8 +246,10 @@ jobs: if curl -fsS -o /dev/null -H "Authorization: token $GITEA_TOKEN" "$API/tags/$TAG"; then echo "release $TAG already exists"; exit 0 fi - body="$(printf 'INBUXA webmail %s.\n\nImage: `%s:%s` (linux/amd64, linux/arm64), also tagged `latest`.' "$VERSION" "$IMAGE" "$DOCKER_TAG")" - jq -n --arg tag "$TAG" --arg body "$body" '{tag_name:$tag, name:$tag, body:$body}' \ + also="$(for t in $TAGS; do [ "$t" = "$VERSION" ] || printf '`%s` ' "$t"; done)" + body="$(printf 'INBUXA webmail %s.\n\nImage: `%s:%s` (linux/amd64, linux/arm64), also tagged %s.' "$VERSION" "$IMAGE" "$VERSION" "${also% }")" + jq -n --arg tag "$TAG" --arg body "$body" --argjson pre "$PRERELEASE" \ + '{tag_name:$tag, name:$tag, body:$body, prerelease:$pre}' \ | curl -fsS -o /dev/null -H "Authorization: token $GITEA_TOKEN" -H "Content-Type: application/json" \ --data @- "$API" echo "release $TAG created" @@ -253,7 +265,6 @@ jobs: runs-on: ubuntu-latest env: VERSION: ${{ needs.version.outputs.version }} - DOCKER_TAG: ${{ needs.version.outputs.docker_tag }} TAG: ${{ github.ref_name }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} steps: @@ -267,8 +278,8 @@ jobs: set -euo pipefail mkdir -p out for arch in amd64 arm64; do - docker pull -q --platform "linux/$arch" "$IMAGE:$DOCKER_TAG" - id="$(docker create --platform "linux/$arch" "$IMAGE:$DOCKER_TAG")" + docker pull -q --platform "linux/$arch" "$IMAGE:$VERSION" + id="$(docker create --platform "linux/$arch" "$IMAGE:$VERSION")" rm -rf app && docker cp "$id:/app" app docker rm -f "$id" >/dev/null printf '%s\n' "$VERSION" > app/VERSION @@ -295,7 +306,7 @@ jobs: # ------------------------------------------------------ ghcr replica ------ # Copies the release image from the Gitea registry, which stays the - # authoritative one, to ghcr.io under the same version tag and :latest. It is + # authoritative one, to ghcr.io under the same tags. It is # a copy, not a second build: the digest on GHCR is the digest on the # registry, so `docker pull ghcr.io/...` gets exactly the same image. Left # out of the report to Gitea, like the release copy, so a GHCR problem @@ -310,14 +321,16 @@ jobs: steps: - env: GH_TOKEN: ${{ github.token }} - TAG: ${{ needs.version.outputs.docker_tag }} + TAG: ${{ needs.version.outputs.version }} + TAGS: ${{ needs.version.outputs.tags }} run: | set -euo pipefail src="${{ vars.REGISTRY }}/${GITHUB_REPOSITORY,,}" dst="ghcr.io/${GITHUB_REPOSITORY,,}" tag="$TAG" echo "$GH_TOKEN" | docker login ghcr.io -u "$GITHUB_ACTOR" --password-stdin - docker buildx imagetools create -t "$dst:$tag" -t "$dst:latest" "$src:$tag" + tags=(); for t in $TAGS; do tags+=(-t "$dst:$t"); done + docker buildx imagetools create "${tags[@]}" "$src:$tag" want="$(docker buildx imagetools inspect "$src:$tag" --format '{{json .Manifest.Digest}}')" got="$(docker buildx imagetools inspect "$dst:$tag" --format '{{json .Manifest.Digest}}')" echo "registry $src:$tag = $want" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 99f8ec8..dff2aed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -210,14 +210,21 @@ behavior is rewritten rather than deleted, so the reversal stays on the record. #### Version numbers -`2026.8.30+pr129` is the date of the commit a build came from and the pull -request that commit arrived through; a commit that did not come through one -carries its short SHA instead (`2026.8.30+g1fa6578`). It is worked out from git -at build time — nothing writes a version into the tree, and `package.json` stays -at `0.0.0`. `node scripts/version.mjs` prints it for the current checkout. +The webmail is numbered with the rest of the INBUXA suite: `27.1` is a series, +`27.1.3` a patch of it and `27.1-rc.1` a release candidate. The `VERSION` file +says which one `main` is working towards, and changes only when a release is +cut. The commit tagged `inbuxa-v` reports it bare; every other build +adds the pull request its commit arrived through (`27.1-rc.1+pr129`), or its +short SHA for a commit that did not come through one (`27.1-rc.1+g1fa6578`). +`package.json` stays at `0.0.0`. `node scripts/version.mjs` prints the version +for the current checkout. The PR number sits after the `+` as build metadata because it records where a -build came from, not how new it is. The version says nothing about the mail server on +build came from, not how new it is. A release candidate is published as a +pre-release, under its own image tag and `27.1-rc`, and never moves `latest`. +Builds from before 27.1 were numbered by date (`2026.8.30+pr129`); anything that +compares versions as numbers ranks those above 27.1, so a pinned install +switches by hand, once. The version says nothing about the mail server on purpose: the server's own version is its own business. Building an image with the version on it, and the single-host `deploy.example.sh`, are covered in [Installing](https://docs.ihasmail.org/install/). diff --git a/Dockerfile b/Dockerfile index d395d57..fac6b91 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,12 @@ # shared runners hit Docker Hub's anonymous pull limit (429), which the # mirror is not subject to. Same images, same digests (checked 2026-10-09). FROM mirror.gcr.io/library/node:26-alpine AS build -# What this build calls itself: 2.16., worked out by whoever runs the -# build. It cannot be worked out in here -- .dockerignore keeps .git out of the -# context on purpose, and git is not installed either. `node scripts/version.mjs` -# in a checkout prints the right answer; ihasmail-deploy.sh passes it through. -# Left empty, the build falls back to the base version from package.json. +# What this build calls itself: 27.1-rc.1, or 27.1-rc.1+pr129 between +# releases, worked out by whoever runs the build. It cannot be worked out in +# here -- .dockerignore keeps .git out of the context on purpose, and git is not +# installed either. `node scripts/version.mjs` in a checkout prints the right +# answer; deploy.example.sh and CI pass it through. Left empty, the build +# reports 0.0.0, which is meant to look wrong. ARG IHASMAIL_VERSION="" ENV IHASMAIL_VERSION=$IHASMAIL_VERSION # The subpath the app will be served from, e.g. /mail. Empty -- the default -- diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..6278b6b --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +27.1-rc.1 diff --git a/deploy.example.sh b/deploy.example.sh index c292553..49ed152 100755 --- a/deploy.example.sh +++ b/deploy.example.sh @@ -34,7 +34,7 @@ set -euo pipefail # --- what to deploy, and where ---------------------------------------------- # The checkout to deploy from. It must be a git clone: the version number is -# read from its history (see scripts/version.mjs). +# read from VERSION and its history (see scripts/version.mjs). APP="${IHASMAIL_APP:-$HOME/apps/ihasmail}" # Environment file passed to the container. Keep it outside the repo's tracked # files -- it holds APP_SECRET and the upstream URL. Never read by this script. @@ -214,25 +214,41 @@ prune_old_images() { printf '%s\n' "$stale" | xargs -r docker rmi >/dev/null 2>&1 || true } -# The version is the same sum scripts/version.mjs does -- the commit's own -# date, plus the pull request it arrived through or its short SHA -- done here -# in shell because a host that only runs containers has git and docker and no +# The version is the same sum scripts/version.mjs does -- the release in +# VERSION, bare on the commit tagged inbuxa-v, else followed by the +# pull request the commit arrived through or its short SHA -- done here in +# shell because a host that only runs containers has git and docker and no # node. Given IHASMAIL_VERSION, use it as given, as the script would. +# +# A rollback to a build from before 27.1 checks out a tree with no VERSION; +# that one is named the way it was then, by the commit's date +# (2026.10.26+gcff6f1f), so it reports what it reported when it was current. version_from_git() { - local date subject sha y m d - date="$(git show -s --format=%cs HEAD)" + local release subject sha y m d subject="$(git show -s --format=%s HEAD)" sha="$(git rev-parse --short HEAD)" - IFS=- read -r y m d <<<"$date" - if [[ "$subject" =~ ^Merge\ pull\ request\ \#([0-9]+) ]]; then - printf '%d.%d.%d+pr%s\n' "$((10#$y))" "$((10#$m))" "$((10#$d))" "${BASH_REMATCH[1]}" + if [ ! -f VERSION ]; then + IFS=- read -r y m d <<<"$(git show -s --format=%cs HEAD)" + if [[ "$subject" =~ ^Merge\ pull\ request\ \#([0-9]+) ]]; then + printf '%d.%d.%d+pr%s\n' "$((10#$y))" "$((10#$m))" "$((10#$d))" "${BASH_REMATCH[1]}" + else + printf '%d.%d.%d+g%s\n' "$((10#$y))" "$((10#$m))" "$((10#$d))" "$sha" + fi + return + fi + release="$(cat VERSION)" + if git tag --points-at HEAD | grep -qxF "inbuxa-v$release"; then + printf '%s\n' "$release" + elif [[ "$subject" =~ ^Merge\ pull\ request\ \#([0-9]+) ]] \ + || [[ "$subject" =~ ^Merge\ pull\ request\ \'.*\'\ \(\#([0-9]+)\)\ from\ ]]; then + printf '%s+pr%s\n' "$release" "${BASH_REMATCH[1]}" else - printf '%d.%d.%d+g%s\n' "$((10#$y))" "$((10#$m))" "$((10#$d))" "$sha" + printf '%s+g%s\n' "$release" "$sha" fi } VERSION="${IHASMAIL_VERSION:-$(version_from_git)}" -# A Docker tag may not contain "+", and every version has one now: -# 2026.8.30+pr129, or +g1fa6578 for a commit that did not come through a pull +# A Docker tag may not contain "+", which every build between releases has: +# 27.1-rc.1+pr129, or +g1fa6578 for a commit that did not come through a pull # request. The image is tagged with the "+" turned into "-"; what the build is # *told* it is keeps the real form, so About and /api/health still report it # correctly. diff --git a/scripts/release-version.sh b/scripts/release-version.sh new file mode 100755 index 0000000..bc5da1a --- /dev/null +++ b/scripts/release-version.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# The suite's release versions, as tags and images name them: 27.1 for a +# series, 27.1.3 for its patches, 27.1-rc.1 for a release candidate. The +# console carries the same helper; the server's tools/release/version.py is +# the same rule in its Cargo form. +# +# release-version.sh tags VERSION image tags, one per line: a release +# moves VERSION, its series and latest; +# a release candidate VERSION and +# -rc, never latest +# release-version.sh prerelease VERSION exit 0 for a release candidate +# +# Anything else, including the old dated versions, is refused (exit 2). +# POSIX sh: it runs in the docker:cli image, which has no bash. +set -eu + +usage() { sed -n '7,13p' "$0" >&2; exit 2; } +[ $# -eq 2 ] || usage +cmd=$1 v=$2 + +echo "$v" | grep -Eq '^[1-9][0-9]\.([1-9]|1[0-2])(\.[1-9][0-9]*|-rc\.[1-9][0-9]*)?$' \ + || { echo "$v is not YY.M, YY.M.N or YY.M-rc.N" >&2; exit 2; } +series=$(echo "$v" | sed -E 's/^([0-9]+\.[0-9]+).*/\1/') +case $v in *-rc.*) rc=1 ;; *) rc=0 ;; esac + +case $cmd in + tags) + if [ $rc = 1 ]; then printf '%s\n%s-rc\n' "$v" "$series" + elif [ "$v" = "$series" ]; then printf '%s\nlatest\n' "$v" + else printf '%s\n%s\nlatest\n' "$v" "$series" + fi ;; + prerelease) [ $rc = 1 ] ;; + *) usage ;; +esac diff --git a/scripts/release-version.test.sh b/scripts/release-version.test.sh new file mode 100755 index 0000000..ba7354b --- /dev/null +++ b/scripts/release-version.test.sh @@ -0,0 +1,20 @@ +#!/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 diff --git a/scripts/version.d.mts b/scripts/version.d.mts index 4331277..7f75820 100644 --- a/scripts/version.d.mts +++ b/scripts/version.d.mts @@ -1,5 +1,6 @@ /** Types for `version.mjs`, which is plain JS so the Dockerfile and shell can run it directly. */ export const UNVERSIONED: string; -export function formatVersion(commit: { date: string; subject?: string; sha: string }): string; -export function versionFromGit(): string | null; +export function readRelease(): string; +export function formatVersion(commit: { release: string; tagged?: boolean; subject?: string; sha: string }): string; +export function versionFromGit(release?: string): string | null; export function resolveVersion(): string; diff --git a/scripts/version.mjs b/scripts/version.mjs index ba737b7..4db7b37 100644 --- a/scripts/version.mjs +++ b/scripts/version.mjs @@ -1,44 +1,37 @@ /** - * Work out this build's version: `2026.8.30+pr129`. + * Work out this build's version: `27.1-rc.1`, or `27.1-rc.1+pr129` between + * releases. * - * 2026.8.30 the date of the commit this was built from - * +pr129 the pull request it arrived through + * 27.1-rc.1 the release this commit belongs to, from the VERSION file + * +pr129 the pull request it arrived through, for a commit that is not + * itself that release * - * The date leads because ihasmail's version used to be `2.16.`, where `16` - * was the Stalwart generation it targeted -- and Stalwart 1.0 will leave that - * with nowhere to go. `2.1` would sort *below* the `2.16` already deployed, so - * every image and About screen would read as a downgrade. Tying our - * numbering to somebody else's was the mistake; which Stalwart a build needs is - * said properly in the README badge and KNOWN-ISSUES, where it can be precise - * ("0.16 or newer; tested against 0.16.20") rather than one digit. - * - * The pull request moved into build metadata, after the `+`, because it is - * provenance rather than a position in a sequence: at a hundred merges a week - * it climbs without bound and says nothing about how new a build is. SemVer - * ignores everything after the `+` when comparing versions, which is the right - * reading -- two builds from the same day differ in where they came from, not - * in rank. Nothing here relies on that comparison anyway: images are pruned - * oldest-first by creation time and rollbacks name a git ref. + * The webmail is numbered with the rest of the INBUXA suite: 27.1 is a series, + * 27.1.3 a patch of it, 27.1-rc.1 a release candidate. VERSION says which one + * main is working towards, and changes only when a release is cut. The commit + * tagged `inbuxa-v` *is* that release and reports it bare; every + * other commit reports it with where the commit came from after a `+`, so a + * build from main between two releases never passes itself off as the + * release. SemVer ignores everything after the `+` when comparing, which is + * the right reading: provenance, not rank. * * A commit that did not arrive through a pull request carries its short SHA - * instead -- `2026.8.30+g1fa6578` -- which is honest about being some commit on - * that day rather than claiming a pull request it was only built after. + * instead -- `27.1-rc.1+g1fa6578`. * - * The date is the commit's own, not today's, so rebuilding an old commit gives - * the same answer it gave the first time. It comes from the commit object, - * timezone included, so two machines agree. + * Until 27.1 the version was the commit's date (`2026.8.30+pr129`). Those + * builds sort *above* 27.1 to anything that compares numerically, which is + * said in the release notes: a pinned install switches by hand, once. * - * Nothing writes a version back into the tree: a committed one would always be - * describing a merge that had not happened yet, and every branch would collide - * on the same line. `package.json` no longer carries it either -- npm wants the - * field, so it stays at `0.0.0`, which is what an unversioned build reports and - * is meant to look wrong. + * `package.json` does not carry the version -- npm wants the field, so it + * stays at `0.0.0`, which is what a build with no git to ask reports and is + * meant to look wrong. * * `.dockerignore` excludes `.git`, so an image build cannot run any of this. * It takes the answer through `--build-arg IHASMAIL_VERSION=...` instead, and - * whoever builds is responsible for computing it -- see ihasmail-deploy.sh. + * whoever builds is responsible for computing it -- see deploy.example.sh. */ import { execFileSync } from "node:child_process"; +import { readFileSync } from "node:fs"; import { fileURLToPath } from "node:url"; import { dirname, join } from "node:path"; @@ -51,48 +44,62 @@ function git(...args) { return execFileSync("git", args, { cwd: root, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim(); } -const PR_SUBJECT = /^Merge pull request #(\d+)\b/; +/** The suite's release form: YY.M, YY.M.N or YY.M-rc.N. */ +const RELEASE = /^[1-9][0-9]\.([1-9]|1[0-2])(\.[1-9][0-9]*|-rc\.[1-9][0-9]*)?$/; /** - * The version for a commit, from the three things about it that decide one. - * Pure, so the rules can be exercised without a repository staged to produce - * them: `{ date: "2026-08-30", subject: "Merge pull request #129 from ...", - * sha: "1fa6578" }` gives `2026.8.30+pr129`. - * - * Leading zeros are stripped because a version field may not carry them, so - * September is `9` rather than `09`. + * A pull request's merge commit. Gitea writes + * `Merge pull request 'Title' (#76) from branch into main`; GitHub, which + * merged the older history, `Merge pull request #129 from owner/branch`. The + * title may hold a `(#n)` of its own, so the number is the last one before + * ` from `. */ -export function formatVersion({ date, subject = "", sha }) { - const [y, m, d] = date.split("-"); - const calendar = `${Number(y)}.${Number(m)}.${Number(d)}`; - const pr = PR_SUBJECT.exec(subject)?.[1]; - return pr ? `${calendar}+pr${pr}` : `${calendar}+g${sha}`; +const PR_SUBJECT = /^Merge pull request (?:#(\d+)\b|'.*' \(#(\d+)\) from )/; + +/** The release named in VERSION; anything else there is a mistake to stop on. */ +export function readRelease() { + const release = readFileSync(join(root, "VERSION"), "utf8").trim(); + if (!RELEASE.test(release)) throw new Error(`VERSION says "${release}", which is not YY.M, YY.M.N or YY.M-rc.N`); + return release; +} + +/** + * The version for a commit, from the things about it that decide one. Pure, + * so the rules can be exercised without a repository staged to produce them: + * `{ release: "27.1-rc.1", subject: "Merge pull request 'x' (#129) from y + * into main", sha: "1fa6578" }` gives `27.1-rc.1+pr129`, and the same with + * `tagged: true` gives `27.1-rc.1`. + */ +export function formatVersion({ release, tagged = false, subject = "", sha }) { + if (tagged) return release; + const m = PR_SUBJECT.exec(subject); + const pr = m?.[1] ?? m?.[2]; + return pr ? `${release}+pr${pr}` : `${release}+g${sha}`; } /** * The version for the commit checked out here, or null when there is no git to * ask -- an unpacked tarball, or the Docker build context. */ -export function versionFromGit() { +export function versionFromGit(release) { let head; - let date; try { head = git("rev-parse", "--short", "HEAD"); - // %cs is the committer date in the commit's own timezone, which is stored - // in the commit -- so this does not depend on the clock or zone of whoever - // is building. - date = git("show", "-s", "--format=%cs", "HEAD"); } catch { return null; } - if (!/^\d{4}-\d{2}-\d{2}$/.test(date)) return null; + // Read only once git has answered: the running image has neither git nor + // VERSION, and is told its version instead. + release ??= readRelease(); let subject = ""; + let tags = []; try { subject = git("show", "-s", "--format=%s", "HEAD"); + tags = git("tag", "--points-at", "HEAD").split("\n"); } catch { - /* no subject to read; fall through to the SHA */ + /* nothing more to read; fall through to the SHA */ } - return formatVersion({ date, subject, sha: head }); + return formatVersion({ release, tagged: tags.includes(`inbuxa-v${release}`), subject, sha: head }); } /** Whatever the environment was told, else git, else an answer that looks wrong. */ diff --git a/server/src/version.test.ts b/server/src/version.test.ts index 71b8885..4d62d9e 100644 --- a/server/src/version.test.ts +++ b/server/src/version.test.ts @@ -1,56 +1,55 @@ import { test } from "node:test"; import assert from "node:assert/strict"; -import { formatVersion, resolveVersion, UNVERSIONED, versionFromGit } from "../../scripts/version.mjs"; +import { readFileSync } from "node:fs"; +import { formatVersion, readRelease, resolveVersion, UNVERSIONED, versionFromGit } from "../../scripts/version.mjs"; /** * The version is this build's public identity: it names the image, and it is - * what About and /api/health report. It had no tests while it was - * `2.16.`; it has them now that the rules moved. + * what About and /api/health report. It is the suite's release number from + * VERSION, bare on the tagged release and with the commit's provenance after + * a `+` on anything else. */ -test("a pull request merge is named by its number", () => { +const commit = { release: "27.1-rc.1", sha: "1fa6578" }; + +test("the tagged release reports VERSION exactly", () => { + assert.equal(formatVersion({ ...commit, tagged: true, subject: "Merge pull request 'x' (#129) from y into main" }), "27.1-rc.1"); +}); + +test("a Gitea pull request merge is named by its number", () => { + // Gitea's subject, which the dated scheme never matched: every Gitea merge + // went out as +g. assert.equal( - formatVersion({ date: "2026-08-30", subject: "Merge pull request #129 from Coffey-Labs/link-project-site-v2", sha: "1fa6578" }), - "2026.8.30+pr129", + formatVersion({ ...commit, subject: "Merge pull request 'Fetch List-Unsubscribe as URLs (#12 follow-up)' (#76) from fix/list-unsubscribe-as-urls into main" }), + "27.1-rc.1+pr76", ); }); +test("a GitHub pull request merge from the older history is named too", () => { + assert.equal(formatVersion({ ...commit, subject: "Merge pull request #129 from Coffey-Labs/link-project-site-v2" }), "27.1-rc.1+pr129"); +}); + test("a commit that did not come through a pull request carries its SHA", () => { // Claiming the last PR would say it *is* that PR rather than something after it. - assert.equal(formatVersion({ date: "2026-08-30", subject: "Fix a thing directly on main", sha: "1fa6578" }), "2026.8.30+g1fa6578"); + assert.equal(formatVersion({ ...commit, subject: "Fix a thing directly on main" }), "27.1-rc.1+g1fa6578"); + assert.equal(formatVersion({ ...commit, subject: "Mention pull request #5 in passing" }), "27.1-rc.1+g1fa6578"); }); -test("leading zeros are stripped, since a version field may not carry them", () => { - assert.equal(formatVersion({ date: "2026-09-05", subject: "Merge pull request #7 from x/y", sha: "abc1234" }), "2026.9.5+pr7"); - assert.equal(formatVersion({ date: "2027-01-01", subject: "", sha: "abc1234" }), "2027.1.1+gabc1234"); +test("an untagged commit never reports bare, so it cannot pass for the release", () => { + assert.match(formatVersion(commit), /\+/); }); -test("it sorts forward from the versions it replaces", () => { - // 2.16.129 was deployed. 2.1.x would have read as a downgrade, which is the - // whole reason the Stalwart generation left the version. - const [older, newer] = ["2.16.129", "2026.8.30"].map((v) => v.split(".").map(Number)); - assert.ok(newer![0]! > older![0]!, "the leading field has to increase"); -}); - -test("two builds from the same day differ, even though they rank the same", () => { - const a = formatVersion({ date: "2026-08-30", subject: "Merge pull request #128 from x/y", sha: "aaaaaaa" }); - const b = formatVersion({ date: "2026-08-30", subject: "Merge pull request #129 from x/y", sha: "bbbbbbb" }); - assert.notEqual(a, b); - assert.equal(a.split("+")[0], b.split("+")[0]); -}); - -test("the same commit always resolves to the same version", () => { - // Built from the commit's own date, not today's, so an old commit rebuilt - // now reports what it reported then. - const commit = { date: "2026-08-30", subject: "Merge pull request #129 from x/y", sha: "1fa6578" }; - assert.equal(formatVersion(commit), formatVersion(commit)); +test("VERSION names a suite release and nothing else", () => { + const release = readRelease(); + assert.equal(release, readFileSync(new URL("../../VERSION", import.meta.url), "utf8").trim()); + assert.match(release, /^[1-9][0-9]\.([1-9]|1[0-2])(\.[1-9][0-9]*|-rc\.[1-9][0-9]*)?$/); }); test("an explicit IHASMAIL_VERSION wins, because the Docker build has no git", () => { const before = process.env.IHASMAIL_VERSION; - process.env.IHASMAIL_VERSION = "2026.8.30+pr129"; + process.env.IHASMAIL_VERSION = "27.1-rc.1+pr129"; try { - assert.equal(resolveVersion(), "2026.8.30+pr129"); + assert.equal(resolveVersion(), "27.1-rc.1+pr129"); } finally { if (before === undefined) delete process.env.IHASMAIL_VERSION; else process.env.IHASMAIL_VERSION = before; @@ -58,6 +57,8 @@ test("an explicit IHASMAIL_VERSION wins, because the Docker build has no git", ( }); test("a checkout with git resolves to a real version, and an unversioned build looks wrong", () => { - assert.match(versionFromGit() ?? "", /^\d{4}\.\d{1,2}\.\d{1,2}\+(pr\d+|g[0-9a-f]+)$/); + const release = readRelease(); + assert.ok((versionFromGit() ?? "").startsWith(release)); + assert.match(versionFromGit("27.1") ?? "", /^27\.1(\+(pr\d+|g[0-9a-f]+))?$/); assert.equal(UNVERSIONED, "0.0.0"); }); diff --git a/web/src/lib/version.ts b/web/src/lib/version.ts index 7bfb016..f841157 100644 --- a/web/src/lib/version.ts +++ b/web/src/lib/version.ts @@ -1,8 +1,8 @@ /** - * What this build calls itself: `2026.8.30+pr129` -- the date of the commit it - * was built from, and the pull request that commit arrived through. A commit - * that did not come through one carries its short SHA instead, - * `2026.8.30+g1fa6578`. Baked in by Vite; see `scripts/version.mjs` for why the - * parts are what they are. + * What this build calls itself: the suite release it belongs to, `27.1-rc.1`, + * bare on the release itself and followed by the pull request its commit + * arrived through anywhere else, `27.1-rc.1+pr129`. A commit that did not come + * through one carries its short SHA instead, `27.1-rc.1+g1fa6578`. Baked in by + * Vite; see `scripts/version.mjs` for why the parts are what they are. */ export const APP_VERSION = __IHASMAIL_VERSION__; diff --git a/web/src/locales/de.ts b/web/src/locales/de.ts index 1aec786..f0aaa4e 100644 --- a/web/src/locales/de.ts +++ b/web/src/locales/de.ts @@ -1147,7 +1147,7 @@ export const catalog: Catalog = { "Drop here for the top level": "Hierher ziehen für die oberste Ebene", // ── Remaining prose ──────────────────────────────────────────────── - "{app}'s own version is the date of the commit it was built from, followed by where that commit came from: {example} was built from a commit dated the 30th of August 2026 that arrived through pull request 129. A commit that did not come through one carries its short SHA instead — {sha}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "Die Version von {app} ist das Datum des Commits, aus dem es gebaut wurde, gefolgt davon, woher dieser Commit stammt: {example} wurde aus einem Commit vom 30. August 2026 gebaut, der über Pull Request 129 kam. Ein Commit, der nicht über einen solchen kam, trägt stattdessen seinen kurzen SHA — {sha}. Die Version sagt bewusst nichts über den Mailserver aus; was dieser Build vom Server benötigt, steht in der Zeile darüber.", + "{app}'s own version is the suite release it belongs to: {example} is the first release candidate of the 27.1 series. A build made between releases adds where its commit came from — the pull request it arrived through, or its short SHA if it did not come through one, as in {build}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "Die Version von {app} ist das Release der Suite, zu dem es gehört: {example} ist der erste Release Candidate der Reihe 27.1. Ein Build zwischen zwei Releases nennt zusätzlich, woher sein Commit stammt — den Pull Request, über den er kam, oder seinen kurzen SHA, wenn er nicht über einen solchen kam, wie in {build}. Die Version sagt bewusst nichts über den Mailserver aus; was dieser Build vom Server benötigt, steht in der Zeile darüber.", // ── Weekdays, schedule presets, rule operators ───────────────────── // Header names (List-Id, X-Spam-Status) stay English: they are the actual diff --git a/web/src/locales/es.ts b/web/src/locales/es.ts index 802c322..2b1af9a 100644 --- a/web/src/locales/es.ts +++ b/web/src/locales/es.ts @@ -1168,7 +1168,7 @@ export const catalog: Catalog = { "Only languages {app} has been translated into appear here, so this list grows as translations land rather than ahead of them \u2014 a language offered without strings behind it would leave the page claiming to be in a language it is not.": "Aqu\u00ed solo aparecen los idiomas a los que se ha traducido {app}, as\u00ed que la lista crece a medida que llegan las traducciones y no antes: un idioma ofrecido sin textos detr\u00e1s har\u00eda que la p\u00e1gina afirmara estar en un idioma que no es el suyo.", "tell us about it": "cuéntenoslo", "This translation was generated by AI and has not been checked by a native speaker, so it is marked Beta until somebody who speaks it signs it off. Anything that reads wrongly is worth reporting — {report}.": "Esta traducción la ha generado una IA y no la ha revisado ninguna persona de habla nativa, así que está marcada como Beta hasta que alguien la dé por buena. Todo lo que suene mal merece un aviso: {report}.", - "{app}'s own version is the date of the commit it was built from, followed by where that commit came from: {example} was built from a commit dated the 30th of August 2026 that arrived through pull request 129. A commit that did not come through one carries its short SHA instead — {sha}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "La versión de {app} es la fecha del commit a partir del cual se compiló, seguida de su procedencia: {example} se compiló a partir de un commit del 30 de agosto de 2026 que llegó mediante la pull request 129. Un commit que no llegó por esa vía lleva en su lugar su SHA corto: {sha}. La versión no dice nada sobre el servidor de correo a propósito; lo que esta compilación necesita del servidor está en la línea de arriba.", + "{app}'s own version is the suite release it belongs to: {example} is the first release candidate of the 27.1 series. A build made between releases adds where its commit came from — the pull request it arrived through, or its short SHA if it did not come through one, as in {build}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "La versión de {app} es la versión de la suite a la que pertenece: {example} es la primera versión candidata de la serie 27.1. Una compilación hecha entre dos versiones añade la procedencia de su commit: la pull request por la que llegó o, si no llegó por esa vía, su SHA corto, como en {build}. La versión no dice nada sobre el servidor de correo a propósito; lo que esta compilación necesita del servidor está en la línea de arriba.", // ── Composer status, calendar title ──────────────────────────────── "New message": "Mensaje nuevo", diff --git a/web/src/locales/fr.ts b/web/src/locales/fr.ts index e709951..5f5b2ba 100644 --- a/web/src/locales/fr.ts +++ b/web/src/locales/fr.ts @@ -1173,7 +1173,7 @@ export const catalog: Catalog = { "Only languages {app} has been translated into appear here, so this list grows as translations land rather than ahead of them \u2014 a language offered without strings behind it would leave the page claiming to be in a language it is not.": "Seules les langues dans lesquelles {app} a \u00e9t\u00e9 traduit apparaissent ici : la liste s'allonge donc \u00e0 mesure que les traductions arrivent, et non avant \u2014 une langue propos\u00e9e sans textes derri\u00e8re elle ferait pr\u00e9tendre \u00e0 la page qu'elle est dans une langue qui n'est pas la sienne.", "tell us about it": "signalez-le-nous", "This translation was generated by AI and has not been checked by a native speaker, so it is marked Beta until somebody who speaks it signs it off. Anything that reads wrongly is worth reporting — {report}.": "Cette traduction a été générée par une IA et n'a pas été relue par une personne de langue maternelle française ; elle est donc marquée Beta jusqu'à validation. Tout ce qui sonne faux mérite d'être signalé — {report}.", - "{app}'s own version is the date of the commit it was built from, followed by where that commit came from: {example} was built from a commit dated the 30th of August 2026 that arrived through pull request 129. A commit that did not come through one carries its short SHA instead — {sha}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "La version de {app} est la date du commit à partir duquel elle a été construite, suivie de l'origine de ce commit : {example} provient d'un commit daté du 30 août 2026 arrivé via la pull request 129. Un commit qui n'est pas passé par là porte à la place son SHA court — {sha}. La version ne dit délibérément rien du serveur de messagerie ; ce dont cette build a besoin du serveur figure à la ligne ci-dessus.", + "{app}'s own version is the suite release it belongs to: {example} is the first release candidate of the 27.1 series. A build made between releases adds where its commit came from — the pull request it arrived through, or its short SHA if it did not come through one, as in {build}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "La version de {app} est la version de la suite à laquelle elle appartient : {example} est la première version candidate de la série 27.1. Une build faite entre deux versions indique en plus l'origine de son commit — la pull request par laquelle il est arrivé, ou son SHA court s'il n'est pas passé par là, comme dans {build}. La version ne dit délibérément rien du serveur de messagerie ; ce dont cette build a besoin du serveur figure à la ligne ci-dessus.", // ── Composer status, calendar title ──────────────────────────────── "New message": "Nouveau message", diff --git a/web/src/locales/ja.ts b/web/src/locales/ja.ts index d895d3f..8bebd11 100644 --- a/web/src/locales/ja.ts +++ b/web/src/locales/ja.ts @@ -1113,7 +1113,7 @@ export const catalog: Catalog = { "A separate password for a mail app or device, which you can revoke on its own. App passwords skip two-factor codes, so they keep working in apps that can't ask for one.": "メールアプリやデバイスごとに用意する別のパスワードで、単独で無効化できます。アプリパスワードは 2 段階認証の確認コードを省くため、コードを入力できないアプリでも使えます。", "Copy it into {name} now — it isn't shown again.": "いま {name} にコピーしてください。二度と表示されません。", "No other users found in the directory, so nobody new can be added. Sharing already in place is listed below and can still be removed.": "ディレクトリに他のユーザーが見つからないため、新しく追加することはできません。すでに設定されている共有は下に表示され、解除はできます。", - "{app}'s own version is the date of the commit it was built from, followed by where that commit came from: {example} was built from a commit dated the 30th of August 2026 that arrived through pull request 129. A commit that did not come through one carries its short SHA instead — {sha}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "{app} 自身のバージョンは、ビルド元となったコミットの日付と、そのコミットの出どころを並べたものです。{example} は 2026 年 8 月 30 日付のコミットから作られ、そのコミットはプルリクエスト 129 を通って届きました。プルリクエストを経ていないコミットは、代わりに短い SHA が付きます — {sha}。バージョンには メールサーバーに関する情報をあえて含めていません。このビルドがサーバーに求めるものは、上の行に示されています。", + "{app}'s own version is the suite release it belongs to: {example} is the first release candidate of the 27.1 series. A build made between releases adds where its commit came from — the pull request it arrived through, or its short SHA if it did not come through one, as in {build}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "{app} 自身のバージョンは、所属するスイートのリリースを表します。{example} は 27.1 系列の最初のリリース候補です。リリースとリリースの間に作られたビルドには、コミットの出どころが加わります。プルリクエストを通って届いたものはその番号、そうでないものは短い SHA です(例:{build})。バージョンには メールサーバーに関する情報をあえて含めていません。このビルドがサーバーに求めるものは、上の行に示されています。", // ── Constant labels ──────────────────────────────────────────────── "Add": "追加", diff --git a/web/src/locales/nl.ts b/web/src/locales/nl.ts index 414f05f..701c1d6 100644 --- a/web/src/locales/nl.ts +++ b/web/src/locales/nl.ts @@ -1168,7 +1168,7 @@ export const catalog: Catalog = { "Only languages {app} has been translated into appear here, so this list grows as translations land rather than ahead of them \u2014 a language offered without strings behind it would leave the page claiming to be in a language it is not.": "Hier verschijnen alleen de talen waarin {app} is vertaald; de lijst wordt uitgebreid zodra vertalingen beschikbaar komen, in plaats van vooraf \u2014 een aangeboden taal zonder bijbehorende vertalingen zou ervoor zorgen dat de pagina beweert in een taal te zijn die niet beschikbaar is.", "tell us about it": "laat het ons weten", "This translation was generated by AI and has not been checked by a native speaker, so it is marked Beta until somebody who speaks it signs it off. Anything that reads wrongly is worth reporting — {report}.": "Deze vertaling is door AI gemaakt en niet gecontroleerd door iemand met Nederlands als moedertaal; ze is daarom als Beta gemarkeerd tot iemand haar goedkeurt. Alles wat verkeerd klinkt, is een melding waard — {report}.", - "{app}'s own version is the date of the commit it was built from, followed by where that commit came from: {example} was built from a commit dated the 30th of August 2026 that arrived through pull request 129. A commit that did not come through one carries its short SHA instead — {sha}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "De eigen versie van {app} is de datum van de commit waaruit het is gebouwd, gevolgd door waar die commit vandaan kwam: {example} is gebouwd uit een commit van 30 augustus 2026 die via pull request 129 binnenkwam. Een commit die niet via zo'n verzoek kwam, draagt in plaats daarvan zijn korte SHA — {sha}. De versie zegt bewust niets over de mailserver; wat deze build van de server nodig heeft, staat op de regel hierboven.", + "{app}'s own version is the suite release it belongs to: {example} is the first release candidate of the 27.1 series. A build made between releases adds where its commit came from — the pull request it arrived through, or its short SHA if it did not come through one, as in {build}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "De eigen versie van {app} is de release van de suite waartoe het behoort: {example} is de eerste releasekandidaat van de 27.1-reeks. Een build die tussen twee releases is gemaakt, vermeldt daarnaast waar zijn commit vandaan kwam — het pull request waarmee die binnenkwam, of zijn korte SHA als hij niet via zo'n verzoek kwam, zoals in {build}. De versie zegt bewust niets over de mailserver; wat deze build van de server nodig heeft, staat op de regel hierboven.", // ── Composer status, calendar title ──────────────────────────────── "New message": "Nieuw bericht", diff --git a/web/src/locales/pt-BR.ts b/web/src/locales/pt-BR.ts index cf39983..a4c4532 100644 --- a/web/src/locales/pt-BR.ts +++ b/web/src/locales/pt-BR.ts @@ -1171,7 +1171,7 @@ export const catalog: Catalog = { "Only languages {app} has been translated into appear here, so this list grows as translations land rather than ahead of them \u2014 a language offered without strings behind it would leave the page claiming to be in a language it is not.": "Aqui aparecem s\u00f3 os idiomas para os quais o {app} foi traduzido, ent\u00e3o a lista cresce conforme as tradu\u00e7\u00f5es chegam, e n\u00e3o antes \u2014 um idioma oferecido sem textos por tr\u00e1s faria a p\u00e1gina afirmar estar em um idioma que n\u00e3o \u00e9 o dela.", "tell us about it": "conte para nós", "This translation was generated by AI and has not been checked by a native speaker, so it is marked Beta until somebody who speaks it signs it off. Anything that reads wrongly is worth reporting — {report}.": "Esta tradução foi gerada por IA e não foi revisada por uma pessoa nativa, então está marcada como Beta até que alguém a aprove. Tudo o que soar errado vale um aviso — {report}.", - "{app}'s own version is the date of the commit it was built from, followed by where that commit came from: {example} was built from a commit dated the 30th of August 2026 that arrived through pull request 129. A commit that did not come through one carries its short SHA instead — {sha}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "A versão do próprio {app} é a data do commit a partir do qual ele foi compilado, seguida da origem desse commit: {example} foi compilado a partir de um commit de 30 de agosto de 2026 que veio pela pull request 129. Um commit que não veio por uma delas carrega no lugar o SHA curto — {sha}. A versão não diz nada sobre o servidor de e-mail de propósito; o que esta compilação precisa do servidor está na linha acima.", + "{app}'s own version is the suite release it belongs to: {example} is the first release candidate of the 27.1 series. A build made between releases adds where its commit came from — the pull request it arrived through, or its short SHA if it did not come through one, as in {build}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "A versão do próprio {app} é a versão da suíte à qual ele pertence: {example} é a primeira versão candidata da série 27.1. Uma compilação feita entre duas versões acrescenta a origem do seu commit — a pull request pela qual ele veio ou, se não veio por uma delas, o SHA curto, como em {build}. A versão não diz nada sobre o servidor de e-mail de propósito; o que esta compilação precisa do servidor está na linha acima.", // ── Composer status, calendar title ──────────────────────────────── "New message": "Nova mensagem", diff --git a/web/src/locales/ru.ts b/web/src/locales/ru.ts index c9238a2..dee1f4c 100644 --- a/web/src/locales/ru.ts +++ b/web/src/locales/ru.ts @@ -1170,7 +1170,7 @@ export const catalog: Catalog = { "Only languages {app} has been translated into appear here, so this list grows as translations land rather than ahead of them \u2014 a language offered without strings behind it would leave the page claiming to be in a language it is not.": "\u0417\u0434\u0435\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u044f\u0437\u044b\u043a\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 {app} \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0451\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0441\u0442\u0451\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430\u043c\u0438, \u0430 \u043d\u0435 \u043e\u043f\u0435\u0440\u0435\u0436\u0430\u0435\u0442 \u0438\u0445: \u044f\u0437\u044b\u043a \u0431\u0435\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b \u0431\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f.", "tell us about it": "сообщите нам", "This translation was generated by AI and has not been checked by a native speaker, so it is marked Beta until somebody who speaks it signs it off. Anything that reads wrongly is worth reporting — {report}.": "Этот перевод сделан ИИ и не проверен носителем языка, поэтому помечен как Beta до тех пор, пока кто-нибудь его не подтвердит. Обо всём, что звучит неправильно, стоит сообщить — {report}.", - "{app}'s own version is the date of the commit it was built from, followed by where that commit came from: {example} was built from a commit dated the 30th of August 2026 that arrived through pull request 129. A commit that did not come through one carries its short SHA instead — {sha}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "Собственная версия {app} — это дата коммита, из которого он собран, и указание, откуда этот коммит взялся: {example} собран из коммита от 30 августа 2026 года, пришедшего через pull request 129. Коммит, пришедший иначе, несёт вместо этого короткий SHA — {sha}. Версия намеренно ничего не сообщает о почтовом сервере; то, что этой сборке нужно от сервера, указано строкой выше.", + "{app}'s own version is the suite release it belongs to: {example} is the first release candidate of the 27.1 series. A build made between releases adds where its commit came from — the pull request it arrived through, or its short SHA if it did not come through one, as in {build}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "Собственная версия {app} — это выпуск пакета, к которому он относится: {example} — первый кандидат в выпуск серии 27.1. Сборка, сделанная между выпусками, дополнительно указывает, откуда взялся её коммит: pull request, через который он пришёл, или короткий SHA, если он пришёл иначе, как в {build}. Версия намеренно ничего не сообщает о почтовом сервере; то, что этой сборке нужно от сервера, указано строкой выше.", // ── Composer status, calendar title ──────────────────────────────── "New message": "Новое письмо", diff --git a/web/src/locales/tr.ts b/web/src/locales/tr.ts index 5feefbb..6ed6fff 100644 --- a/web/src/locales/tr.ts +++ b/web/src/locales/tr.ts @@ -1611,7 +1611,7 @@ export const catalog: Catalog = { "Webmail node": "Web posta düğümü", "Mail server node": "Posta sunucusu düğümü", "This webmail works with the inbuxa mail server, and sign-in refuses a server that doesn't offer what it needs.": "Bu web posta inbuxa posta sunucusuyla çalışır ve gereken özellikleri sunmayan bir sunucuda oturum açmayı reddeder.", - "{app}'s own version is the date of the commit it was built from, followed by where that commit came from: {example} was built from a commit dated the 30th of August 2026 that arrived through pull request 129. A commit that did not come through one carries its short SHA instead — {sha}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "{app}'in kendi sürümü, derlendiği commit'in tarihi ve ardından bu commit'in nereden geldiğidir: {example}, 30 Ağustos 2026 tarihli ve 129 numaralı çekme isteğiyle gelen bir commit'ten derlenmiştir. Bir çekme isteğiyle gelmeyen commit bunun yerine kısa SHA değerini taşır — {sha}. Sürüm bilgisi kasıtlı olarak posta sunucusu hakkında hiçbir şey söylemez; bu derlemenin sunucudan gereksinim duyduğu şey yukarıdaki satırdır.", + "{app}'s own version is the suite release it belongs to: {example} is the first release candidate of the 27.1 series. A build made between releases adds where its commit came from — the pull request it arrived through, or its short SHA if it did not come through one, as in {build}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "{app}'in kendi sürümü, ait olduğu paket sürümüdür: {example}, 27.1 serisinin ilk sürüm adayıdır. İki sürüm arasında yapılan bir derleme, commit'inin nereden geldiğini de ekler — geldiği çekme isteğini ya da bir çekme isteğiyle gelmediyse kısa SHA değerini; {build} örneğinde olduğu gibi. Sürüm bilgisi kasıtlı olarak posta sunucusu hakkında hiçbir şey söylemez; bu derlemenin sunucudan gereksinim duyduğu şey yukarıdaki satırdır.", "You're signed in as {user}. This webmail never sees your password: it holds a sign-in token from your mail server, encrypted per session.": "{user} olarak giriş yaptınız. Bu web posta şifrenizi hiç görmez: posta sunucunuzdan alınan ve her oturumda şifrelenen bir oturum anahtarı tutar.", "You're signed in as {user}. Your password is never stored in the browser; the server keeps it encrypted per-session for talking to the mail server.": "{user} olarak giriş yaptınız. Şifreniz asla tarayıcıda saklanmaz; sunucu, posta sunucusuyla iletişim kurmak için onu her oturumda şifrelenmiş olarak saklar.", "Your organization allows only {app} and JMAP apps, so phone and desktop mail apps can't connect to this account.": "Kuruluşunuz yalnızca {app} ve JMAP uygulamalarına izin veriyor; bu nedenle telefon ve masaüstü posta uygulamaları bu hesaba bağlanamaz.", diff --git a/web/src/locales/uk.ts b/web/src/locales/uk.ts index 2c54b86..58078f0 100644 --- a/web/src/locales/uk.ts +++ b/web/src/locales/uk.ts @@ -1164,7 +1164,7 @@ export const catalog: Catalog = { "Only languages {app} has been translated into appear here, so this list grows as translations land rather than ahead of them \u2014 a language offered without strings behind it would leave the page claiming to be in a language it is not.": "\u0422\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043b\u0438\u0448\u0435 \u043c\u043e\u0432\u0438, \u044f\u043a\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u0435\u043d\u043e {app}, \u0442\u043e\u043c\u0443 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0440\u043e\u0441\u0442\u0430\u0454 \u0440\u0430\u0437\u043e\u043c \u0456\u0437 \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u0430\u043c\u0438, \u0430 \u043d\u0435 \u0432\u0438\u043f\u0435\u0440\u0435\u0434\u0436\u0430\u0454 \u0457\u0445: \u043c\u043e\u0432\u0430 \u0431\u0435\u0437 \u0442\u0435\u043a\u0441\u0442\u0456\u0432 \u0437\u043c\u0443\u0441\u0438\u043b\u0430 \u0431 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 \u0441\u0442\u0432\u0435\u0440\u0434\u0436\u0443\u0432\u0430\u0442\u0438, \u0449\u043e \u0432\u043e\u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043c\u043e\u0432\u043e\u044e, \u044f\u043a\u043e\u044e \u043d\u0435 \u0454.", "tell us about it": "повідомте нам", "This translation was generated by AI and has not been checked by a native speaker, so it is marked Beta until somebody who speaks it signs it off. Anything that reads wrongly is worth reporting — {report}.": "Цей переклад зроблено ШІ й не перевірено носієм мови, тому його позначено як Beta, доки хтось його не підтвердить. Про все, що звучить неправильно, варто повідомити — {report}.", - "{app}'s own version is the date of the commit it was built from, followed by where that commit came from: {example} was built from a commit dated the 30th of August 2026 that arrived through pull request 129. A commit that did not come through one carries its short SHA instead — {sha}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "Власна версія {app} — це дата коміту, з якого його зібрано, і вказівка, звідки цей коміт узявся: {example} зібрано з коміту від 30 серпня 2026 року, що надійшов через pull request 129. Коміт, який надійшов інакше, несе замість цього короткий SHA — {sha}. Версія навмисно нічого не повідомляє про поштовий сервер; те, що цій збірці потрібно від сервера, вказано рядком вище.", + "{app}'s own version is the suite release it belongs to: {example} is the first release candidate of the 27.1 series. A build made between releases adds where its commit came from — the pull request it arrived through, or its short SHA if it did not come through one, as in {build}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "Власна версія {app} — це випуск пакета, до якого він належить: {example} — перший кандидат у випуск серії 27.1. Збірка, зроблена між випусками, додатково вказує, звідки взявся її коміт: pull request, через який він надійшов, або короткий SHA, якщо він надійшов інакше, як у {build}. Версія навмисно нічого не повідомляє про поштовий сервер; те, що цій збірці потрібно від сервера, вказано рядком вище.", // ── Composer status, calendar title ──────────────────────────────── "New message": "Новий лист", diff --git a/web/src/locales/zh-Hans.ts b/web/src/locales/zh-Hans.ts index 18dc416..1e5c0b3 100644 --- a/web/src/locales/zh-Hans.ts +++ b/web/src/locales/zh-Hans.ts @@ -1112,7 +1112,7 @@ export const catalog: Catalog = { "A separate password for a mail app or device, which you can revoke on its own. App passwords skip two-factor codes, so they keep working in apps that can't ask for one.": "为某个邮件应用或设备单独设置的密码,可以单独吊销。应用专用密码会跳过两步验证码,因此在无法输入验证码的应用中仍然可用。", "Copy it into {name} now — it isn't shown again.": "请立即把它复制到 {name}——它不会再次显示。", "No other users found in the directory, so nobody new can be added. Sharing already in place is listed below and can still be removed.": "目录中没有找到其他用户,因此无法添加新的共享对象。已有的共享列在下方,仍可移除。", - "{app}'s own version is the date of the commit it was built from, followed by where that commit came from: {example} was built from a commit dated the 30th of August 2026 that arrived through pull request 129. A commit that did not come through one carries its short SHA instead — {sha}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "{app} 自身的版本号是其构建所用提交的日期,后面跟着该提交的来源:{example} 表示由 2026 年 8 月 30 日的一个提交构建而成,而该提交来自第 129 号拉取请求。未经拉取请求的提交则改用简短 SHA 表示——{sha}。版本号刻意不包含任何关于邮件服务器的信息;此版本对服务器的要求见上一行。", + "{app}'s own version is the suite release it belongs to: {example} is the first release candidate of the 27.1 series. A build made between releases adds where its commit came from — the pull request it arrived through, or its short SHA if it did not come through one, as in {build}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.": "{app} 自身的版本号是它所属的套件版本:{example} 是 27.1 系列的第一个候选版本。在两个版本之间构建的版本还会附上其提交的来源——经由拉取请求的提交附上该请求的编号,否则附上简短 SHA,如 {build}。版本号刻意不包含任何关于邮件服务器的信息;此版本对服务器的要求见上一行。", // ── Constant labels ──────────────────────────────────────────────── "Add": "添加", diff --git a/web/src/views/settings/AboutSettings.tsx b/web/src/views/settings/AboutSettings.tsx index 4c1a400..e1349f0 100644 --- a/web/src/views/settings/AboutSettings.tsx +++ b/web/src/views/settings/AboutSettings.tsx @@ -79,7 +79,7 @@ export function AboutSettings() {

{t("This webmail works with the inbuxa mail server, and sign-in refuses a server that doesn't offer what it needs.")}

-

{tNode("{app}'s own version is the date of the commit it was built from, followed by where that commit came from: {example} was built from a commit dated the 30th of August 2026 that arrived through pull request 129. A commit that did not come through one carries its short SHA instead — {sha}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.", { example: v2026.8.30+pr129, sha: +g1fa6578 }, { app: appName })}

+

{tNode("{app}'s own version is the suite release it belongs to: {example} is the first release candidate of the 27.1 series. A build made between releases adds where its commit came from — the pull request it arrived through, or its short SHA if it did not come through one, as in {build}. The version deliberately says nothing about the mail server; what this build needs from the server is the line above.", { example: v27.1-rc.1, build: v27.1-rc.1+pr129 }, { app: appName })}

{t("Server capabilities")}

{caps.map((c) => {c.replace("urn:ietf:params:jmap:", "")})}