fix(deploy): build via make so version/commit/builtAt land in the binary
- SHA
0b7d10d0bb9fcbc1d0eedbccffb1820d8de689b1- Parents
-
f121117 - Tree
9ca7135
0b7d10d
0b7d10d0bb9fcbc1d0eedbccffb1820d8de689b1f121117
9ca7135| Status | File | + | - |
|---|---|---|---|
| M |
.github/workflows/deploy.yml
|
10 | 4 |
.github/workflows/deploy.ymlmodified@@ -46,12 +46,18 @@ jobs: | ||
| 46 | 46 | go-version-file: go.mod |
| 47 | 47 | cache: true |
| 48 | 48 | |
| 49 | - - name: Build shithubd for linux/amd64 | |
| 49 | + # Delegate to `make build` so the version-injection ldflags | |
| 50 | + # (Version/Commit/BuiltAt → internal/version) are the same set | |
| 51 | + # the local Makefile uses. The previous inline `go build` here | |
| 52 | + # passed only `-s -w`, which left the homepage stamps showing | |
| 53 | + # "dev (unknown, built unknown)" on every deployed binary. | |
| 54 | + # The runner is linux/amd64 so no cross-compile is needed. | |
| 55 | + # Output goes to ./shithubd (overriding BIN) so the next step's | |
| 56 | + # `< shithubd` redirect picks it up. | |
| 57 | + - name: Build shithubd | |
| 50 | 58 | env: |
| 51 | 59 | CGO_ENABLED: "0" |
| 52 | - GOOS: linux | |
| 53 | - GOARCH: amd64 | |
| 54 | - run: go build -trimpath -ldflags "-s -w" -o shithubd ./cmd/shithubd | |
| 60 | + run: make build BIN=shithubd | |
| 55 | 61 | |
| 56 | 62 | - name: Configure SSH |
| 57 | 63 | env: |