X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fxds%2Fxds-agent.git;a=blobdiff_plain;f=Makefile;h=cde26981e9f9e9ec36b5ef7d8859f83c4cc18f2d;hp=1fc555839965cc3fff9dc93b6a31e8c04e7aea42;hb=2d3f1be6a495143d7e82f6396a49dfff6cabc3e4;hpb=1499569abc3e8440592add96f96e01791282a246 diff --git a/Makefile b/Makefile index 1fc5558..cde2698 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ SYNCTHING_INOTIFY_VERSION = 0.8.7 # Retrieve git tag/commit to set version & sub-version strings -GIT_DESC := $(shell git describe --always --tags) +GIT_DESC := $(shell git describe --always --tags --match "[0-9]*") VERSION := $(firstword $(subst -, ,$(GIT_DESC))) ifeq (-,$(findstring -,$(GIT_DESC))) SUB_VERSION := $(subst $(VERSION)-,,$(GIT_DESC)) @@ -92,11 +92,13 @@ else WEBAPP_BUILD_RULE=build:prod endif -ifeq ($(SUB_VERSION), ) - PACKAGE_ZIPFILE := $(TARGET)_$(ARCH)-$(VERSION).zip +# Build Package name (model: _-..zip) +ifeq (-g,$(findstring -g,$(GIT_DESC))) + NB_COMMIT=$(firstword $(subst -, ,$(SUB_VERSION))) else - PACKAGE_ZIPFILE := $(TARGET)_$(ARCH)-$(VERSION)_$(SUB_VERSION).zip + NB_COMMIT=0 endif +PACKAGE_ZIPFILE := $(TARGET)_$(ARCH)-$(VERSION).$(NB_COMMIT).zip all: tools/syncthing build @@ -129,7 +131,7 @@ clean: .PHONY: distclean distclean: clean - cd $(ROOT_SRCDIR) && rm -rf $(LOCAL_BINDIR) ./tools ./glide.lock ./vendor ./*.zip ./webapp/node_modules ./webapp/dist + (cd $(ROOT_SRCDIR) && rm -rf $(LOCAL_BINDIR) ./tools ./glide.lock ./vendor ./*.zip ./webapp/dist ./webapp/node_modules) webapp: webapp/install ifneq ($(SKIP_WEBAPP_BUILD), true) @@ -193,7 +195,7 @@ tools/glide: @test -f $(LOCAL_TOOLSDIR)/glide || { \ echo "Downloading glide"; \ mkdir -p $(LOCAL_TOOLSDIR); \ - curl --silent -L https://glide.sh/get | GOBIN=$(LOCAL_TOOLSDIR) sh; \ + curl --silent --connect-timeout 60 --retry 3 -L https://glide.sh/get | GOBIN=$(LOCAL_TOOLSDIR) sh; \ } .PHONY: tools/syncthing @@ -219,7 +221,7 @@ checkgover: .PHONY: help help: @echo "Main supported rules:" - @echo " all (default)" + @echo " all (default)" @echo " build" @echo " package" @echo " install"