Images now report the real version instead of dev.
The Dockerfile builder stage declares ARG VERSION=dev and runs make build VERSION="${VERSION}". A variable given on the make command
line already overrides the Makefile's git describe default, so the Makefile only gains a comment saying so.
script/docker (make docker) runs git describe --tags --always --dirty
on the host and passes the result as --build-arg VERSION. .dockerignore
leaves .git out of the build context, which is why git describe inside
the build always fell back to dev. Those lines are copied from the org's
model script/docker.
logger.Identify, which logs starting with the version, was never called,
so the startup log had no version at all. main now calls it before
anything else starts. The health check response already carried the
version.
README "Build-Time Variables" and the script/docker entry say where the
version comes from.
With no tags in the repo yet, the version is the short commit hash, with -dirty for a tree with uncommitted changes.
Disclosures:
A build that passes no argument (script/cibuild in CI, and upaas unless
it passes one) still reports dev.
Judgement call: when git describe fails on the host, script/docker
passes unknown (the model script's fallback), not the Makefile's dev.
No test covers the new Identify call in main; nothing in main has
tests.
Images now report the real version instead of `dev`.
- The `Dockerfile` builder stage declares `ARG VERSION=dev` and runs
`make build VERSION="${VERSION}"`. A variable given on the `make` command
line already overrides the `Makefile`'s `git describe` default, so the
`Makefile` only gains a comment saying so.
- `script/docker` (`make docker`) runs `git describe --tags --always --dirty`
on the host and passes the result as `--build-arg VERSION`. `.dockerignore`
leaves `.git` out of the build context, which is why `git describe` inside
the build always fell back to `dev`. Those lines are copied from the org's
model `script/docker`.
- `logger.Identify`, which logs `starting` with the version, was never called,
so the startup log had no version at all. `main` now calls it before
anything else starts. The health check response already carried the
version.
- README "Build-Time Variables" and the `script/docker` entry say where the
version comes from.
With no tags in the repo yet, the version is the short commit hash, with
`-dirty` for a tree with uncommitted changes.
Disclosures:
- A build that passes no argument (`script/cibuild` in CI, and upaas unless
it passes one) still reports `dev`.
- Judgement call: when `git describe` fails on the host, `script/docker`
passes `unknown` (the model script's fallback), not the `Makefile`'s `dev`.
- No test covers the new `Identify` call in `main`; nothing in `main` has
tests.
Closes https://git.eeqj.de/sneak/dnswatcher/issues/109
Model: opus-5-5
clawbot
added this to the 1.0 milestone 2026-10-01 21:44:19 +02:00
The Dockerfile builder stage takes ARG VERSION (default `dev`) and passes
it to `make build` on the command line, which overrides the Makefile's
`git describe` default. script/docker computes the version from
`git describe` on the host and passes it as --build-arg VERSION, because
.dockerignore leaves .git out of the build context and `git describe`
inside the build only ever produced `dev`. A build that passes no
argument, such as script/cibuild, still reports `dev`.
`logger.Identify`, which logs `starting` with the version, was never
called; `main` now calls it first, so the version is in the startup log.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Images now report the real version instead of
dev.Dockerfilebuilder stage declaresARG VERSION=devand runsmake build VERSION="${VERSION}". A variable given on themakecommandline already overrides the
Makefile'sgit describedefault, so theMakefileonly gains a comment saying so.script/docker(make docker) runsgit describe --tags --always --dirtyon the host and passes the result as
--build-arg VERSION..dockerignoreleaves
.gitout of the build context, which is whygit describeinsidethe build always fell back to
dev. Those lines are copied from the org'smodel
script/docker.logger.Identify, which logsstartingwith the version, was never called,so the startup log had no version at all.
mainnow calls it beforeanything else starts. The health check response already carried the
version.
script/dockerentry say where theversion comes from.
With no tags in the repo yet, the version is the short commit hash, with
-dirtyfor a tree with uncommitted changes.Disclosures:
script/cibuildin CI, and upaas unlessit passes one) still reports
dev.git describefails on the host,script/dockerpasses
unknown(the model script's fallback), not theMakefile'sdev.Identifycall inmain; nothing inmainhastests.
Closes #109
Model: opus-5-5
Review passed on
eb7a1f2.Model: opus-5-5
eb7a1f2d3btoaf79b46d17