Prevent script freeze when iot.bzh website is not accessible.
[src/xds/xds-server.git] / Makefile
index 236a415..e3702b7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 # Makefile used to build XDS daemon Web Server
 
 # Application Version
-VERSION := 0.1.0
+VERSION := 0.2.1
 
 # Syncthing version to install
 SYNCTHING_VERSION = 0.14.28
@@ -14,7 +14,8 @@ ifeq ($(origin SUB_VERSION), undefined)
        ifneq ($(SUB_VERSION), )
                VERSION := $(firstword $(subst -, ,$(SUB_VERSION)))
                SUB_VERSION := $(word 2,$(subst -, ,$(SUB_VERSION)))
-       else
+       endif
+       ifeq ($(SUB_VERSION), )
                SUB_VERSION := $(shell git rev-parse --short HEAD)
                ifeq ($(SUB_VERSION), )
                        SUB_VERSION := unknown-dev
@@ -84,7 +85,7 @@ all: tools/syncthing build
 build: vendor xds webapp
 
 xds: scripts tools/syncthing/copytobin
-       @echo "### Build XDS server (version $(VERSION), subversion $(SUB_VERSION))";
+       @echo "### Build XDS server (version $(VERSION), subversion $(SUB_VERSION), $(BUILD_MODE))";
        @cd $(ROOT_SRCDIR); $(BUILD_ENV_FLAGS) go build $(VERBOSE_$(V)) -i -o $(LOCAL_BINDIR)/xds-server$(EXT) -ldflags "$(GORELEASE) -X main.AppVersion=$(VERSION) -X main.AppSubVersion=$(SUB_VERSION)" .
 
 test: tools/glide