Implements #86: a plain docker build . of a clone now stamps the commit's tag or short commit into netwatch-server (the version field of its http begin listen log line and of the health check) instead of dev.
The builder stage installs git, copies the context's .git to /git, and takes the version from the VERSION build argument when one is given, otherwise from git describe --tags --always. A version that still comes out empty, dev or unknown fails the build. ARG VERSION has no default; backend/script/build still does the stamping.
.dockerignore leaves out .git/config: a clone's remote URL can carry a credential, and git describe does not need that file. .git itself was already in the context.
script/docker and script/cibuild keep passing their own version; only their comments changed, to the wording of sneak/prompts#70.
What the diff does not show:
.git goes to /git, not /src/.git: with git installed, go build would otherwise find it, record VCS details of a work tree holding only backend/, and could fail on a .git file.
No buildarch is left in the repo.
Disclosures:
Judgement call: the step has no [ -e .git ] test. The builder copies .git itself, so the test would always be true there. A context without .git already failed in the frontend stage (vite.config.js runs git rev-parse), and now also fails at that copy.
TODO.md has no entry: the brief allows TODO.md edits only where the issue names it.
Model: opus-5-5
Implements https://git.eeqj.de/sneak/netwatch/issues/86: a plain `docker build .` of a clone now stamps the commit's tag or short commit into `netwatch-server` (the `version` field of its `http begin listen` log line and of the health check) instead of `dev`.
- The builder stage installs `git`, copies the context's `.git` to `/git`, and takes the version from the `VERSION` build argument when one is given, otherwise from `git describe --tags --always`. A version that still comes out empty, `dev` or `unknown` fails the build. `ARG VERSION` has no default; `backend/script/build` still does the stamping.
- `.dockerignore` leaves out `.git/config`: a clone's remote URL can carry a credential, and `git describe` does not need that file. `.git` itself was already in the context.
- `script/docker` and `script/cibuild` keep passing their own version; only their comments changed, to the wording of https://git.eeqj.de/sneak/prompts/pulls/70.
What the diff does not show:
- `.git` goes to `/git`, not `/src/.git`: with `git` installed, `go build` would otherwise find it, record VCS details of a work tree holding only `backend/`, and could fail on a `.git` file.
- No `buildarch` is left in the repo.
Disclosures:
- Judgement call: the step has no `[ -e .git ]` test. The builder copies `.git` itself, so the test would always be true there. A context without `.git` already failed in the frontend stage (`vite.config.js` runs `git rev-parse`), and now also fails at that copy.
- `TODO.md` has no entry: the brief allows `TODO.md` edits only where the issue names it.
Model: opus-5-5
The builder stage now has git and takes the version from the VERSION
build argument when one is given, otherwise from `git describe --tags
--always` of the repo's .git, copied to /git so go build does not see
it. A version that still comes out empty, dev or unknown fails the
build. ARG VERSION has no default. .dockerignore keeps .git/config out
of the build context, and the comments in script/docker and
script/cibuild no longer say .git is excluded.
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.
Implements #86: a plain
docker build .of a clone now stamps the commit's tag or short commit intonetwatch-server(theversionfield of itshttp begin listenlog line and of the health check) instead ofdev.git, copies the context's.gitto/git, and takes the version from theVERSIONbuild argument when one is given, otherwise fromgit describe --tags --always. A version that still comes out empty,devorunknownfails the build.ARG VERSIONhas no default;backend/script/buildstill does the stamping..dockerignoreleaves out.git/config: a clone's remote URL can carry a credential, andgit describedoes not need that file..gititself was already in the context.script/dockerandscript/cibuildkeep passing their own version; only their comments changed, to the wording of sneak/prompts#70.What the diff does not show:
.gitgoes to/git, not/src/.git: withgitinstalled,go buildwould otherwise find it, record VCS details of a work tree holding onlybackend/, and could fail on a.gitfile.buildarchis left in the repo.Disclosures:
[ -e .git ]test. The builder copies.gititself, so the test would always be true there. A context without.gitalready failed in the frontend stage (vite.config.jsrunsgit rev-parse), and now also fails at that copy.TODO.mdhas no entry: the brief allowsTODO.mdedits only where the issue names it.Model: opus-5-5
Review passed.
Model: opus-5-5