diff options
author | Robin Jarry <robin@jarry.cc> | 2024-01-31 22:51:00 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-02-01 00:59:01 +0100 |
commit | 69e63b529ae16d9f26ed67b2831d0c1756ef267d (patch) | |
tree | c0b6f145e9f169beebd6d6fad58147d3d265eec2 /GNUmakefile | |
parent | 4cc2e6be3a010ecfba314909ce9b594f04e1be0e (diff) | |
download | aerc-69e63b529ae16d9f26ed67b2831d0c1756ef267d.tar.gz |
main: improve version string
Initialize a build variable to the date on which the binary was
generated. Include the date in the build info string which is output
when running aerc -v and in the crash logs.
Do not rely on parsing the build flags via some obscure base64 voodoo to
determine if notmuch support is available or not. Instead, use the
symbols from the linked library directly if available.
Before:
$ aerc -v
0.16.0-183-g4cc2e6be3a01 +notmuch (go1.21.6 amd64 linux)
After:
$ aerc -v
aerc 0.16.0-183-g4cc2e6be3a01 +notmuch-5.6.0 (go1.21.6 amd64 linux 2024-01-31)
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: CiarĂ¡n Ainsworth <cda@sporiff.dev>
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile index 274f2c6d..7f75c4be 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,6 +1,7 @@ # variables that can be changed by users # VERSION ?= $(shell git describe --long --abbrev=12 --tags --dirty 2>/dev/null || echo 0.16.0) +DATE ?= $(shell date +%Y-%m-%d) PREFIX ?= /usr/local BINDIR ?= $(PREFIX)/bin SHAREDIR ?= $(PREFIX)/share/aerc @@ -11,7 +12,7 @@ GOFLAGS ?= $(shell contrib/goflags.sh) BUILD_OPTS ?= -trimpath GO_LDFLAGS := GO_LDFLAGS += -X main.Version=$(VERSION) -GO_LDFLAGS += -X main.Flags=$(shell echo -- $(GOFLAGS) | base64 | tr -d '\r\n') +GO_LDFLAGS += -X main.Date=$(DATE) GO_LDFLAGS += -X git.sr.ht/~rjarry/aerc/config.shareDir=$(SHAREDIR) GO_LDFLAGS += -X git.sr.ht/~rjarry/aerc/config.libexecDir=$(LIBEXECDIR) GO_LDFLAGS += $(GO_EXTRA_LDFLAGS) |