Makefile: Support building from source tarball v1.5
authorAndrey Petrov <andrey.petrov@shazow.net>
Wed, 17 Aug 2016 17:34:06 +0000 (13:34 -0400)
committerAndrey Petrov <andrey.petrov@shazow.net>
Wed, 17 Aug 2016 17:34:12 +0000 (13:34 -0400)
Fixes #168

Makefile

index 33f846271fe37b97f7400fe6cb93bde747e3d934..a43917c709f30e99923285b85aaf74a6eb9afa23 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ KEY = host_key
 PORT = 2022
 
 SRCS = %.go
-VERSION := $(shell git describe --tags --dirty --always)
+VERSION := $(shell git describe --tags --dirty --always 2> /dev/null || echo "dev")
 LDFLAGS = LDFLAGS="-X main.Version=$(VERSION)"
 
 SUBPACKAGES := $(shell go list ./... | grep -v /vendor/)