better versioning

This commit is contained in:
ari committed 2026-11-01 13:59:26 -05:00
1 parent 7f58254dbc
commit 092ef6185f
3 files changed
+18 -1

No files matched your search

+4
View File
@@ -7,6 +7,10 @@ Rules for anyone, human or AI, changing this repo. Read [ARCHITECTURE.md](ARCHIT
- `nix develop` (or direnv with `.envrc`) gives Go, gopls, staticcheck, delve and btrfs-progs. Use it rather than system tools.
- Go code lives in `slackerbot/`, and that's where `go` commands run. Nix files and docs live at the repo root.
## Versioning
Versions look like `YYYY.MM.DD-<commit-sha>`. `flake.nix` builds the string from the commit date and short rev (with `-dirty` for uncommitted trees) and passes it to the binary with `-X main.version`. Don't hardcode a version anywhere. `slackerbot -version` prints it, and a plain `go build` reports `dev`.
## Checks before you finish
Run from `slackerbot/`, and all must pass: