File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ PROJECT := $(CURRENT_DIR:$(GOPATH)/src/%=%)
23
23
NAME := $(notdir $(PROJECT))
24
24
GIT_COMMIT ?= $(shell git rev-parse --short HEAD)
25
25
VERSION ?= $(shell git describe --always)
26
+ LD_FLAGS := -X main.version=${VERSION}
26
27
27
28
# Create a cross-compile target for every os-arch pairing. This will generate
28
29
# a make target for each os/arch like "make linux/amd64" as well as generate a
@@ -34,11 +35,11 @@ define make-xc-target
34
35
else ifeq (${1},windows)
35
36
@printf "%s%20s %s\n" "-->" "${1}/${2}:" "${PROJECT} (-w -extldflags "-static" -extld ${WINDOWS_EXTLD_${2}})"
36
37
@xgo -go ${GOVERSION} -deps ${LIBTOOL_PATH} -targets '${1}-${WINDOWS_API_LEVEL}/${2}' \
37
- -ldflags '-w -extldflags "-static" -extld ${WINDOWS_EXTLD_${2}}' .
38
+ -ldflags '${LD_FLAGS} -w -extldflags "-static" -extld ${WINDOWS_EXTLD_${2}}' .
38
39
@mv ghostunnel-${1}-${WINDOWS_API_LEVEL}-${2}.exe dist/ghostunnel-${VERSION}-${1}-${2}-with-pkcs11.exe
39
40
else
40
41
@printf "%s%20s %s\n" "-->" "${1}/${2}:" "${PROJECT}"
41
- @xgo -go ${GOVERSION} -deps ${LIBTOOL_PATH} -targets '${1}/${2}' .
42
+ @xgo -go ${GOVERSION} -deps ${LIBTOOL_PATH} -ldflags "${LD_FLAGS}" - targets '${1}/${2}' .
42
43
@mv ghostunnel-${1}*-${2} dist/ghostunnel-${VERSION}-${1}-${2}-with-pkcs11
43
44
endif
44
45
.PHONY: $1/$2
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ import (
42
42
)
43
43
44
44
var (
45
- version = "v1.2.0-rc.2 "
45
+ version = "master "
46
46
defaultMetricsPrefix = "ghostunnel"
47
47
)
48
48
You can’t perform that action at this time.
0 commit comments