Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Add a hack to Makefile to always force go build (so that build flags/version is always picked up.)

Kailash Nadh1550fe240391
diff --git a/Makefile b/Makefile
index 3ab92ece..90ecdcfb 100644
--- a/Makefile
+++ b/Makefile
@@ -47,8 +47,12 @@ build: $(BIN)
$(STUFFBIN):
go install github.com/knadh/stuffbin/...
+# Hack to always trigger Go build so that changes to version/build linker flags are picked up.
+.PHONY: FORCE
+FORCE:
+
# Build the backend to ./listmonk.
-$(BIN): $(SRC) go.mod go.sum schema.sql $(SQL) permissions.json
+$(BIN): FORCE $(SRC) go.mod go.sum schema.sql $(SQL) permissions.json
CGO_ENABLED=0 go build -o ${BIN} -ldflags="-s -w -X 'main.buildString=${BUILDSTR}' -X 'main.versionString=${VERSION}'" ./cmd
# Run the backend in dev mode. DEV_CONFIG is set by the dev container to use