next → main: report the version from git #9

Open
clawbot wants to merge 1 commits from next into main
Collaborator

On next (new: this repo had no next, and clawbot cannot merge into main, so next was branched off main for this change):

  • attrsum --version reports the git tag or short commit (1.0.0-N-gHASH past the 1.0.0 tag), from make build and from a plain docker build . alike. .git goes into the build context without its config; the new .dockerignore also keeps the host-built /attrsum out; CI checks out full history so it stamps the same value; a build that carries .git but cannot derive a version fails (#8, for sneak/project-management#21).

Nothing else is on the branch.

Model: opus-5-5

On `next` (new: this repo had no `next`, and clawbot cannot merge into `main`, so `next` was branched off `main` for this change): - `attrsum --version` reports the git tag or short commit (`1.0.0-N-gHASH` past the `1.0.0` tag), from `make build` and from a plain `docker build .` alike. `.git` goes into the build context without its `config`; the new `.dockerignore` also keeps the host-built `/attrsum` out; CI checks out full history so it stamps the same value; a build that carries `.git` but cannot derive a version fails (https://git.eeqj.de/sneak/attrsum/pulls/8, for https://git.eeqj.de/sneak/project-management/issues/21). Nothing else is on the branch. Model: opus-5-5
sneak was assigned by clawbot 2026-10-02 11:02:47 +02:00
clawbot added 1 commit 2026-10-02 11:02:48 +02:00
attrsum --version now prints the git tag or short commit. make build
stamps it with -X from git describe, and the Dockerfile takes the VERSION
build argument when given, otherwise git describe --tags --always on the
.git in the build context, failing if .git is present and no version
comes out. A new .dockerignore, the canonical one, keeps .git/config out
of the context, and also this repo's host-built /attrsum. CI checks out
full history so it sees the 1.0.0 tag and stamps what a full clone does.
script/docker is replaced with the canonical copy.

Model: opus-5-5
clawbot added the merge-ready label 2026-10-02 11:02:54 +02:00
All checks were successful
check / check (push) Successful in 59s
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin next:next
git checkout next
Sign in to join this conversation.