Report development builds as such, not as the release version
Only a release build (the commit tagged v<VERSION>, unchanged) gives a version number. Others print 'dev <commit> (3 commits after v0.2.0-rc.1)', from git describe (the Makefile's DESCRIBE), in jarld version, jarl --version, jarl status, jarl whoami and the startup log; a build without git says '(source build)'. The CLI's User-Agent and the footer's tooltip follow suit, and /status's build gains since and ahead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
88bb89a9ff
commit
fb1ee09250
7 files changed
+123
-23
No files matched your search
+12
-6
@@ -232,17 +232,23 @@ runs it as a check before building.
|
||||
|
||||
### Which version a build reports
|
||||
|
||||
The footer of the web UI, `jarld version` and `jarl --version` say what a
|
||||
binary was built from, linking to it on Gitea:
|
||||
The footer of the web UI, `jarld version`, `jarl --version`, `jarl status`
|
||||
and `jarl whoami` say what a binary was built from (the footer links to
|
||||
it on Gitea). Only a release build reports a version number:
|
||||
|
||||
* **A release**: `make` run on the commit tagged `v<VERSION>` with no
|
||||
tracked file changed. The Makefile then sets `RELEASE_TAG`, and the
|
||||
footer reads "Powered by Jarl v0.2.0", linking to the release. The
|
||||
release workflow sets `RELEASE_TAG` itself.
|
||||
* **Any other build**: the commit, which Go records from git: "Powered by
|
||||
Jarl 1a2b3c4d5e6f", linking to the commit. With uncommitted changes it
|
||||
is marked `-modified`. The version commands print `0.2.0 (1a2b3c4d5e6f)`.
|
||||
* **No git** (a build from a source tarball): just `VERSION`.
|
||||
* **Any other build** is a development build, named by its commit (which
|
||||
Go records from git) rather than `VERSION`: "Powered by Jarl
|
||||
1a2b3c4d5e6f", linking to the commit. With uncommitted changes it is
|
||||
marked `-modified`. The other places add where it stands relative to
|
||||
the last tag, from `git describe` (the Makefile's `DESCRIBE`):
|
||||
`dev 1a2b3c4d5e6f (3 commits after v0.2.0-rc.1)`, or
|
||||
`dev 1a2b3c4d5e6f-modified (v0.2.0-rc.1 with uncommitted changes)`.
|
||||
* **No git** (a build from a source archive): `VERSION`, marked as such:
|
||||
`0.2.0 (source build)`.
|
||||
|
||||
`RELEASE_TAG=v0.2.0 make` forces the first case.
|
||||
|
||||
|
||||
Reference in new issue
Block a user