From 5115e74d668d218b24315dc33ce3c7cacc4bb682 Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 16 Jul 2019 17:24:06 +0800 Subject: [PATCH] update version format --- Makefile | 3 +-- cmd/tun2socks/main.go | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4fc6bb4..91b9f79 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,8 @@ NAME=tun2socks BUILDDIR=$(shell pwd)/build CMDDIR=$(shell pwd)/cmd/tun2socks VERSION=$(shell git describe --tags --long || echo "unknown version") -BUILDTIME=$(shell date -u) BUILD_TAGS='socks fakedns d stats' -BUILD_LDFLAGS='-s -w -X "main.version=$(VERSION)" -X "main.buildTime=$(BUILDTIME)"' +BUILD_LDFLAGS='-s -w -X "main.version=$(VERSION)"' GOBUILD=go build -ldflags $(BUILD_LDFLAGS) -v -tags $(BUILD_TAGS) all: build diff --git a/cmd/tun2socks/main.go b/cmd/tun2socks/main.go index 8b9235a..07acb6e 100644 --- a/cmd/tun2socks/main.go +++ b/cmd/tun2socks/main.go @@ -22,8 +22,8 @@ import ( const MTU = 1500 var ( - version = "unknown version" - buildTime = "unknown time" + version = "unknown version" + description = "A tun2socks implementation written in Go." args = new(CmdArgs) postFlagsInitFn = make([]func(), 0) @@ -65,7 +65,8 @@ func registerHandlerCreator(name string, creator func()) { } func showVersion() { - fmt.Println("tun2socks", version, buildTime) + fmt.Println("Go-tun2socks", version) + fmt.Println(description) } func main() {