Commit 8f520b3
committed
fix(main): forward release ldflags into internal/version; dev --frozen-lockfile
Addresses two copilot review follow-ups from #561:
1. release-time ldflags now land in real package-level variables.
The go-app template sets '-X main.version=<tag>' and
'-X main.build=<commit>' — but this repo reads build metadata
from github.com/netresearch/ldap-manager/internal/version
(Version / CommitHash / BuildTimestamp), so the ldflags were a
silent no-op and tagged releases still reported 'dev'.
Add 'var version, build string' to cmd/ldap-manager/main.go, alias
the internal/version import to 'internalversion' to avoid
shadowing, and forward the build-injected values into
internalversion.Version / CommitHash at init() time. The existing
FormatVersion() / 'version --json' subcommand now reflect the
actual release info. Switch all 'version.' uses in main.go to
'internalversion.' to match the alias.
2. Dockerfile dev stage: add --frozen-lockfile to 'bun install' for
reproducibility parity with the release matrix's
'bun install --frozen-lockfile'.
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>1 parent 68ce50f commit 8f520b3
2 files changed
Lines changed: 26 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
29 | 48 | | |
30 | 49 | | |
31 | 50 | | |
| |||
38 | 57 | | |
39 | 58 | | |
40 | 59 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
44 | 63 | | |
45 | 64 | | |
46 | 65 | | |
47 | 66 | | |
48 | 67 | | |
49 | 68 | | |
50 | | - | |
| 69 | + | |
51 | 70 | | |
52 | 71 | | |
53 | 72 | | |
| |||
56 | 75 | | |
57 | 76 | | |
58 | 77 | | |
59 | | - | |
| 78 | + | |
60 | 79 | | |
61 | 80 | | |
62 | 81 | | |
| |||
0 commit comments