aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-08-12 12:24:52 +0200
committerRobin Jarry <robin@jarry.cc>2022-08-22 15:46:33 +0200
commitd7e6dc3649eadc27bdfdac77785b6bbf77d30b79 (patch)
treefcd3eebf66f7ac3264b06dc584f0c5c09f716028 /Makefile
parent45e506e6aebdfdcb743d2d861eaddb85a01b3d5b (diff)
downloadaerc-d7e6dc3649eadc27bdfdac77785b6bbf77d30b79.tar.gz
aerc-d7e6dc3649eadc27bdfdac77785b6bbf77d30b79.zip
aerc: add build info to version string
Example: $ aerc -v aerc 0.11.0 +notmuch (go1.18.4 amd64 linux) Also include that version information in the debug and panic logs. debug.ReadBuildInfo() is only available in go 1.18+. Add a new variable set at build time to store $GOFLAGS. Suggested-by: Tim Culverhouse <tim@timculverhouse.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c799682e..551fb1ed 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ BUILD_OPTS?=-trimpath
# ignore environment variable
GO_LDFLAGS:=
GO_LDFLAGS+=-X main.Version=$(VERSION)
+GO_LDFLAGS+=-X main.Flags=$(GOFLAGS)
GO_LDFLAGS+=-X git.sr.ht/~rjarry/aerc/config.shareDir=$(SHAREDIR)
GO_LDFLAGS+=$(GO_EXTRA_LDFLAGS)