diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8bc4c92 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +export GO ?= go + +.PHONY: all +all: wireproxy + +.PHONY: wireproxy +wireproxy: + tag="$$(git describe --tag 2>/dev/null)" && \ + ${GO} build -ldflags "-X 'main.version=$$tag'" ./cmd/wireproxy + +.PHONY: clean +clean: + ${RM} wireproxy diff --git a/README.md b/README.md index ba2257c..473fcdb 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Arguments: ``` git clone https://github.com/octeep/wireproxy cd wireproxy -go build ./cmd/wireproxy +make ``` # Sample config file diff --git a/cmd/wireproxy/main.go b/cmd/wireproxy/main.go index 7472e81..22fd8ed 100644 --- a/cmd/wireproxy/main.go +++ b/cmd/wireproxy/main.go @@ -14,7 +14,7 @@ import ( // an argument to denote that this process was spawned by -d const daemonProcess = "daemon-process" -var version = "1.0.4-dev" +var version = "1.0.5-dev" // attempts to pledge and panic if it fails // this does nothing on non-OpenBSD systems