[SEMVER] X.Y.Z+A.B.C replaced with X.Y.Z+gitea-A.B.C

Gitea versions are

* A.B.C
* A.B.C+rc-0
* A.B.C+dev-5-g4fb9056

If Forgejo versions are:

* X.Y.Z+A.B.C
* X.Y.Z-rc0+A.B.C
* X.Y.Z-dev-1232-g4fb905687+A.B.C

It is non trivial for a client trying to sort out if the server
responding to `/api/v1/version` is Forgejo or Gitea. The Forgejo
version changes to be:

* X.Y.Z+gitea-A.B.C
* X.Y.Z-rc0+gitea-A.B.C
* X.Y.Z-dev-1232-g4fb905687+gitea-A.B.C

and a client can now:

* Split the version with +
* If the second part (the metadata) exists and contains "gitea", the
  answer server is Forgejo
* Otherwise it is Gitea
This commit is contained in:
Earl Warren 2024-02-28 15:57:48 +01:00
parent 7af1349c1d
commit 07b99560cc
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -85,7 +85,7 @@ endif
STORED_VERSION_FILE := VERSION
HUGO_VERSION ?= 0.111.3
GITEA_COMPATIBILITY ?= 1.22.0
GITEA_COMPATIBILITY ?= gitea-1.22.0
STORED_VERSION=$(shell cat $(STORED_VERSION_FILE) 2>/dev/null)
ifneq ($(STORED_VERSION),)