Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
613817c4fd |
@@ -1,7 +1,8 @@
|
|||||||
.PHONY: all bootstrap setup check test lint fmt fmt-check build clean deps test-coverage test-integration install release release-snapshot docker hooks
|
.PHONY: all bootstrap setup check test lint fmt fmt-check build clean deps test-coverage test-integration install release release-snapshot docker hooks
|
||||||
|
|
||||||
# Version number
|
# Stamped into the binary: the same `git describe` the Dockerfile runs, so a
|
||||||
VERSION := 0.1.0-dev
|
# host build reports the same version as the image.
|
||||||
|
VERSION ?= $(shell git describe --tags --always)
|
||||||
|
|
||||||
# Default target
|
# Default target
|
||||||
all: bsdaily
|
all: bsdaily
|
||||||
@@ -36,7 +37,7 @@ lint:
|
|||||||
|
|
||||||
# Build binary (pure Go; no CGO required since we use modernc.org/sqlite).
|
# Build binary (pure Go; no CGO required since we use modernc.org/sqlite).
|
||||||
bsdaily: internal/*/*.go cmd/bsdaily/*.go
|
bsdaily: internal/*/*.go cmd/bsdaily/*.go
|
||||||
CGO_ENABLED=0 go build -o $@ ./cmd/bsdaily
|
CGO_ENABLED=0 go build -ldflags "-X main.Version=$(VERSION)" -o $@ ./cmd/bsdaily
|
||||||
|
|
||||||
# Clean build artifacts.
|
# Clean build artifacts.
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ green with the new lint config.
|
|||||||
|
|
||||||
# Completed Steps
|
# Completed Steps
|
||||||
|
|
||||||
- 2026-10-02: A plain `docker build .` stamps the git tag or short commit
|
- 2026-10-02: A plain `docker build .` and a host `make` build stamp the git tag
|
||||||
into the binary, which `bsdaily --version` prints; added the canonical
|
or short commit into the binary, which `bsdaily --version` prints; added the
|
||||||
`.dockerignore`, which keeps `.git/config` out of the build context.
|
canonical `.dockerignore`, which keeps `.git/config` out of the build context.
|
||||||
- 2026-07-07 Adopted scripts-to-rule-them-all: `script/` entrypoints,
|
- 2026-07-07 Adopted scripts-to-rule-them-all: `script/` entrypoints,
|
||||||
Makefile shims, README Entrypoints section
|
Makefile shims, README Entrypoints section
|
||||||
- 2026-06-28: Fixed errcheck lint failures; added compilation smoke test;
|
- 2026-06-28: Fixed errcheck lint failures; added compilation smoke test;
|
||||||
|
|||||||
+2
-1
@@ -11,7 +11,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Version is the git tag or short commit, set at link time with -X by the
|
// Version is the git tag or short commit, set at link time with -X by the
|
||||||
// Dockerfile, and printed by --version. Builds that do not set it report dev.
|
// Dockerfile and the Makefile, and printed by --version. Builds that do not set
|
||||||
|
// it report dev.
|
||||||
var Version = "dev"
|
var Version = "dev"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
Reference in New Issue
Block a user