chore: extract version from main.go in flake.nix

Use builtins.match to parse version from cmd/homelab-deploy/main.go
so only one location needs updating when bumping versions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-07 04:25:38 +01:00
parent e1ab4599a8
commit 95fbfb2339
2 changed files with 7 additions and 4 deletions

View File

@@ -113,9 +113,7 @@ Follow semantic versioning:
- **Minor** (0.x.0): Non-breaking changes adding features
- **Major** (x.0.0): Breaking changes
Update the version in **both** locations:
1. `const version` in `cmd/homelab-deploy/main.go`
2. `version` field in `flake.nix`
Update `const version` in `cmd/homelab-deploy/main.go`. The Nix build extracts the version from there automatically.
**When to bump**: If any Go code has changed, bump the version before committing. Do this automatically when asked to commit. On feature branches, only bump once per branch (check if version has already been bumped compared to master).