No build architecture. Implements #107. The Makefile no longer defines BUILDARCH or passes -X main.Buildarch=.... No Buildarch variable exists in the code, so that flag never set anything. The architecture is available at run time from runtime.GOARCH; neoircd does not report it, and none is added.
The Docker build stamps the git version. Implements #109. A plain docker build . stamped dev into neoircd, because .dockerignore left out .git and the builder declared ARG VERSION=dev. Now:
.dockerignore sends .git into the build but leaves out .git/config. A clone's remote URL, or the token a CI checkout stores there, can hold a credential, and git describe does not need that file.
The builder takes the version from the VERSION build argument when one is given. Otherwise it uses git describe --tags --always, which gives the tag on a tagged commit and the short commit otherwise. ARG VERSION has no default.
If .git is present and the version still comes out empty, dev or unknown, the build fails.
Things the diff does not show:
The version shows in the healthcheck JSON and in the IRC welcome. The startup log does not include it, because Identify() is never called. That is unchanged here.
A build without .git and without VERSION, such as one from a source tarball, now stamps an empty version, not dev. The IRC welcome already shows dev for an empty version.
.git changes on every commit, so a docs-only commit no longer reuses the cached build.
Model: opus-5-5
**No build architecture.** Implements https://git.eeqj.de/sneak/neoirc/issues/107. The `Makefile` no longer defines `BUILDARCH` or passes `-X main.Buildarch=...`. No `Buildarch` variable exists in the code, so that flag never set anything. The architecture is available at run time from `runtime.GOARCH`; `neoircd` does not report it, and none is added.
**The Docker build stamps the git version.** Implements https://git.eeqj.de/sneak/neoirc/issues/109. A plain `docker build .` stamped `dev` into `neoircd`, because `.dockerignore` left out `.git` and the builder declared `ARG VERSION=dev`. Now:
- `.dockerignore` sends `.git` into the build but leaves out `.git/config`. A clone's remote URL, or the token a CI checkout stores there, can hold a credential, and `git describe` does not need that file.
- The builder takes the version from the `VERSION` build argument when one is given. Otherwise it uses `git describe --tags --always`, which gives the tag on a tagged commit and the short commit otherwise. `ARG VERSION` has no default.
- If `.git` is present and the version still comes out empty, `dev` or `unknown`, the build fails.
Things the diff does not show:
- The version shows in the healthcheck JSON and in the IRC welcome. The startup log does not include it, because `Identify()` is never called. That is unchanged here.
- A build without `.git` and without `VERSION`, such as one from a source tarball, now stamps an empty version, not `dev`. The IRC welcome already shows `dev` for an empty version.
- `.git` changes on every commit, so a docs-only commit no longer reuses the cached build.
Model: opus-5-5
next is green again (915f56e, #105), so this PR no longer waits on it. It needs a rebase onto current next before its review, and the red-check disclosure in the body no longer applies.
Model: opus-5-5
`next` is green again (`915f56e`, https://git.eeqj.de/sneak/neoirc/pulls/105), so this PR no longer waits on it. It needs a rebase onto current `next` before its review, and the red-check disclosure in the body no longer applies.
Model: opus-5-5
The Makefile no longer passes a build architecture; it set a variable that
does not exist, and the architecture is available at run time.
A plain docker build now stamps neoircd with the tag or short commit:
.dockerignore sends .git, without its config, and the builder takes the
version from the VERSION build arg when given, otherwise from git describe.
With .git present, an empty, dev or unknown version fails the build.
Model: opus-5-5
clawbot
changed title from Remove BUILDARCH from the Makefile (closes #107) to Remove BUILDARCH and stamp the git version in Docker builds (closes #107, closes #109)2026-10-02 03:49:30 +02:00
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.
No build architecture. Implements #107. The
Makefileno longer definesBUILDARCHor passes-X main.Buildarch=.... NoBuildarchvariable exists in the code, so that flag never set anything. The architecture is available at run time fromruntime.GOARCH;neoircddoes not report it, and none is added.The Docker build stamps the git version. Implements #109. A plain
docker build .stampeddevintoneoircd, because.dockerignoreleft out.gitand the builder declaredARG VERSION=dev. Now:.dockerignoresends.gitinto the build but leaves out.git/config. A clone's remote URL, or the token a CI checkout stores there, can hold a credential, andgit describedoes not need that file.VERSIONbuild argument when one is given. Otherwise it usesgit describe --tags --always, which gives the tag on a tagged commit and the short commit otherwise.ARG VERSIONhas no default..gitis present and the version still comes out empty,devorunknown, the build fails.Things the diff does not show:
Identify()is never called. That is unchanged here..gitand withoutVERSION, such as one from a source tarball, now stamps an empty version, notdev. The IRC welcome already showsdevfor an empty version..gitchanges on every commit, so a docs-only commit no longer reuses the cached build.Model: opus-5-5
nextis green again (915f56e, #105), so this PR no longer waits on it. It needs a rebase onto currentnextbefore its review, and the red-check disclosure in the body no longer applies.Model: opus-5-5
b4d798005eto04f60eea50Remove BUILDARCH from the Makefile (closes #107)to Remove BUILDARCH and stamp the git version in Docker builds (closes #107, closes #109)Review passed.
Model: opus-5-5