Closes #35. A plain docker build . stamped dev: .dockerignore left out .git, so make build in the image had nothing to describe.
.dockerignore now sends .git, minus .git/config, whose remote URL can carry a credential; git describe does not need it.
The build stage (alpine, already installs git) takes the VERSION build argument when given, otherwise git describe --tags --always, and fails if the context carries .git and the result is empty, dev or unknown. The value goes in through make build VERSION=..., the existing -X stamping.
What the diff does not show:
No --dirty in the image: .gitea is tracked but still left out of the context, so git there sees it as deleted.
Without .git and without the argument (a source tarball), the step stamps dev, as the Makefile does; an empty make build VERSION= would stamp an empty version.
VERSION goes on the make command line because the Makefile's := ignores one from the environment.
The Makefile already runs git describe --tags --always --dirty; script/docker and script/cibuild pass no version, so they now get it from the build. Neither changed.
Dockerfile.lint shares .dockerignore, so .git reaches the lint build too.
No buildarch in the repo.
Disclosure: REPO_POLICIES.md still shows the old ARG VERSION=dev template; it is the synced canonical copy, changed through sneak/prompts#69.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/keyfunc/issues/35. A plain `docker build .` stamped `dev`: `.dockerignore` left out `.git`, so `make build` in the image had nothing to describe.
- `.dockerignore` now sends `.git`, minus `.git/config`, whose remote URL can carry a credential; `git describe` does not need it.
- The build stage (alpine, already installs `git`) takes the `VERSION` build argument when given, otherwise `git describe --tags --always`, and fails if the context carries `.git` and the result is empty, `dev` or `unknown`. The value goes in through `make build VERSION=...`, the existing `-X` stamping.
What the diff does not show:
- No `--dirty` in the image: `.gitea` is tracked but still left out of the context, so git there sees it as deleted.
- Without `.git` and without the argument (a source tarball), the step stamps `dev`, as the Makefile does; an empty `make build VERSION=` would stamp an empty version.
- `VERSION` goes on the `make` command line because the Makefile's `:=` ignores one from the environment.
- The Makefile already runs `git describe --tags --always --dirty`; `script/docker` and `script/cibuild` pass no version, so they now get it from the build. Neither changed.
- `Dockerfile.lint` shares `.dockerignore`, so `.git` reaches the lint build too.
- No `buildarch` in the repo.
Disclosure: `REPO_POLICIES.md` still shows the old `ARG VERSION=dev` template; it is the synced canonical copy, changed through https://git.eeqj.de/sneak/prompts/issues/69.
Model: opus-5-5
.dockerignore left out .git, so make build inside the image fell back to
"dev". The build context now carries .git, without its config, which can
hold a credential in the remote URL. The build stage takes the VERSION
build argument when one is given, otherwise git describe --tags --always,
and fails if the context carries .git and no version comes out.
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.
Closes #35. A plain
docker build .stampeddev:.dockerignoreleft out.git, somake buildin the image had nothing to describe..dockerignorenow sends.git, minus.git/config, whose remote URL can carry a credential;git describedoes not need it.git) takes theVERSIONbuild argument when given, otherwisegit describe --tags --always, and fails if the context carries.gitand the result is empty,devorunknown. The value goes in throughmake build VERSION=..., the existing-Xstamping.What the diff does not show:
--dirtyin the image:.giteais tracked but still left out of the context, so git there sees it as deleted..gitand without the argument (a source tarball), the step stampsdev, as the Makefile does; an emptymake build VERSION=would stamp an empty version.VERSIONgoes on themakecommand line because the Makefile's:=ignores one from the environment.git describe --tags --always --dirty;script/dockerandscript/cibuildpass no version, so they now get it from the build. Neither changed.Dockerfile.lintshares.dockerignore, so.gitreaches the lint build too.buildarchin the repo.Disclosure:
REPO_POLICIES.mdstill shows the oldARG VERSION=devtemplate; it is the synced canonical copy, changed through sneak/prompts#69.Model: opus-5-5
Review passed.
Model: opus-5-5