summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-01-28 17:23:39 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-01-28 17:23:39 +0100
commitbf3bb888512e74bee0b79bd38826cb019ca2a0ee (patch)
tree5554c1a901300698237ade32c8e90092aefafb20 /Makefile
parent6a128dde71d925fd4865ebd86855213a429b4729 (diff)
device: remove version string
This is what modules are for, and Go binaries can introspect. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 1b77f86..223766b 100644
--- a/Makefile
+++ b/Makefile
@@ -10,10 +10,10 @@ MAKEFLAGS += --no-print-directory
generate-version-and-build:
@export GIT_CEILING_DIRECTORIES="$(realpath $(CURDIR)/..)" && \
tag="$$(git describe --dirty 2>/dev/null)" && \
- ver="$$(printf 'package device\nconst WireGuardGoVersion = "%s"\n' "$${tag#v}")" && \
- [ "$$(cat device/version.go 2>/dev/null)" != "$$ver" ] && \
- echo "$$ver" > device/version.go && \
- git update-index --assume-unchanged device/version.go || true
+ ver="$$(printf 'package main\nconst Version = "%s"\n' "$$tag")" && \
+ [ "$$(cat version.go 2>/dev/null)" != "$$ver" ] && \
+ echo "$$ver" > version.go && \
+ git update-index --assume-unchanged version.go || true
@$(MAKE) wireguard-go
wireguard-go: $(wildcard *.go) $(wildcard */*.go)