update version format

This commit is contained in:
Jason
2019-07-16 17:24:06 +08:00
parent 407e64bb7b
commit 5115e74d66
2 changed files with 5 additions and 5 deletions
+1 -2
View File
@@ -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
+4 -3
View File
@@ -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() {