Files
MokoGIT/VERSIONING.md
jmiller 0cb94ef37d chore(deploy): stage .vault git-stack compose + adopt xx.xx.xx versioning
Repo-only prep to align MokoGIT with the .vault single-source-of-truth structure and the
MokoOrgStandards xx.xx.xx version scheme. No server/.vault changes; relocation coordinated later.

Versioning (replaces leaked Gitea 1.24.0+dev-N-ghash):
- VERSION = 01.00.00 (Makefile STORED_VERSION uses it verbatim on branch builds -> strips the
  git-describe Gitea base; tag builds use the xx.xx.xx tag name).
- VERSIONING.md documents the scheme + how the binary/image version resolves.
- Default the upstream update-checker OFF (modules/setting/setting.go) so the fork never compares
  AppVer against Gitea's release feed.

Staged git-stack compose (target .vault/stacks/git/{prod,rc,dev}):
- deploy/git/{prod,rc,dev}/ each: docker-compose.yml (image mokoconsulting/mokogit per tier tag env
  MOKOGIT[_RC|_DEV]_TAG, containers mokogit/-rc/-dev, /opt/mokogit/{prod,rc,dev} data, host-MySQL
  db mokogit[_rc|_dev], /api/healthz healthcheck), VERSION (01.00.00), .env.example.
- deploy/git/VERSION (per-stack) + README.md (ownership split, reconcile-before-drop, restructure paused).
- Every host/secret value is ${VAR}; modeled on documented live config, marked RECONCILE (diff vs
  the live /opt/mokogitea/docker-compose.yml before dropping into .vault).

Secrets externalized:
- .gitignore now ignores real .env / *.env but keeps *.env.example. No real tokens committed.

Verified: go build ./modules/setting/ ok; .env.example tracked, real .env ignored.
2026-07-16 10:43:18 -05:00

1.9 KiB

MokoGIT Versioning

MokoGIT follows the MokoOrgStandards xx.xx.xx scheme: MAJOR.MINOR.PATCH, two digits per segment (e.g. 01.00.00, 01.04.12). This is MokoGIT's own version line — it deliberately replaces the inherited upstream Gitea version (which previously leaked through as 1.24.0+dev-<N>-g<hash>).

Where the version comes from

The binary version is injected at build time into main.Versionsetting.AppVer (drives the footer, /api/v1/version, and the PWA manifest). The Makefile resolves it in this order:

Build type Source Result
Release (git tag) the tag name ($GITHUB_REF_NAME, v stripped) e.g. tag 01.00.0001.00.00
Branch / dev the repo-root VERSION file (STORED_VERSION) 01.00.00
(fallback only if VERSION is absent) git describe --tags would leak the Gitea base — avoided by shipping VERSION

The committed VERSION file (currently 01.00.00) is what strips the Gitea base on ordinary branch builds. Do not delete it.

Release tagging — MUST use xx.xx.xx

Release/tag automation MUST create tags in the xx.xx.xx form (e.g. 01.00.00). Because the deploy workflows derive the container image tag from git describe --tags, tagging with 01.00.00 makes the deployed image report MokoGIT's version rather than Gitea's. Tiers append a suffix: dev → -dev, rc → -rc.

Update checker

The upstream update-checker defaults to disabled (modules/setting/setting.go) — a fork must not compare its AppVer against Gitea's release feed. Re-enable only against a MokoGIT endpoint.

Scope of a bump

  • PATCH — fixes, no behavior change.
  • MINOR — backward-compatible features (default bump for feature/dev → stable releases).
  • MAJOR — breaking changes.

Per-stack and per-tier VERSION files also live under deploy/git/ for the .vault git stack.