aboutsummaryrefslogtreecommitdiff
path: root/net/tailscale
diff options
context:
space:
mode:
authorMichal Vasilek <michal.vasilek@nic.cz>2022-10-12 19:29:55 +0200
committerMichal Vasilek <michal.vasilek@nic.cz>2022-10-13 11:27:44 +0200
commit738f44be4f39191aa4640086f37ef62420442e06 (patch)
tree675019ae77d4468ab127c72d5a870714e08812a9 /net/tailscale
parentbfb616ba919fbdafa3fd49e3edc9df5163abb4d2 (diff)
tailscale: fix -version
tailscale version, tailscaled -version and the web UI reported the wrong version number which doesn't cause any issues, but it can be confusing. This is fixed by specifying the version in go ldflags similar to how it's done in many other go packages and the official tailscale Dockerfile. version.Long version can not be specified in GO_PKG_LDFLAGS_X because it contains a space and GO_PKG_LDFLAGS_X is always split at a space. Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
Diffstat (limited to 'net/tailscale')
-rw-r--r--net/tailscale/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tailscale/Makefile b/net/tailscale/Makefile
index c6825996b..e74854d16 100644
--- a/net/tailscale/Makefile
+++ b/net/tailscale/Makefile
@@ -27,6 +27,8 @@ PKG_USE_MIPS16:=0
GO_PKG:=\
tailscale.com/cmd/tailscale \
tailscale.com/cmd/tailscaled
+GO_PKG_LDFLAGS:=-X 'tailscale.com/version.Long=$(PKG_VERSION)-$(PKG_RELEASE) (OpenWrt)'
+GO_PKG_LDFLAGS_X:=tailscale.com/version.Short=$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk