summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--main.go4
2 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d629150..7a77930 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ IMAGE="docker.crute.me/websocket-proxy"
2VERSION="0.1.0" 2VERSION="0.1.0"
3 3
4websocket-proxy: main.go sockets.go server.go client.go 4websocket-proxy: main.go sockets.go server.go client.go
5 CGO_ENABLED=0 go build -o $@ $^ 5 CGO_ENABLED=0 go build -ldflags "-X main.version=$(VERSION)" -o $@ $^
6 6
7.PHONY: docker 7.PHONY: docker
8docker: websocket-proxy 8docker: websocket-proxy
diff --git a/main.go b/main.go
index 75555e6..ec4170b 100644
--- a/main.go
+++ b/main.go
@@ -11,9 +11,11 @@ import (
11 "github.com/spf13/cobra" 11 "github.com/spf13/cobra"
12) 12)
13 13
14var version string
15
14var rootCmd = &cobra.Command{ 16var rootCmd = &cobra.Command{
15 Use: "websocket-proxy", 17 Use: "websocket-proxy",
16 Version: "0.1.0", 18 Version: version,
17 Short: "Proxy TCP connections over a websocket", 19 Short: "Proxy TCP connections over a websocket",
18} 20}
19 21