chore(build): Skip relup when there is no upgrade base

This commit is contained in:
Zaiming Shi 2020-12-12 22:06:28 +01:00
parent eb35b2e126
commit 952c140138
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,8 @@
REBAR_VERSION = 3.14.3-emqx-2
REBAR = ./rebar3
export PKG_VSN ?= $(shell git describe --tags --always)
# comma separated versions
export RELUP_BASE_VERSIONS ?=
PROFILE ?= emqx
PROFILES := emqx emqx-edge check test

View File

@ -31,12 +31,14 @@ endif
.PHONY: $(PROFILES:%=relup-%)
$(PROFILES:%=relup-%): $(REBAR)
ifneq ($(RELUP_BASE_VERSIONS),)
ifneq ($(OS),Windows_NT)
@if [ ! -z $$(ls | grep -E "$(@:relup-%=%)-$(SYSTEM)-(.*)-$$(uname -m).zip" | head -1 ) ]; then \
mkdir -p tmp/relup_packages/$(@:relup-%=%); \
cp $(@:relup-%=%)-$(SYSTEM)-*-$$(uname -m).zip tmp/relup_packages/$(@:relup-%=%); \
fi
$(REBAR) as $(@:relup-%=%) relup
$(REBAR) as $(@:relup-%=%) relup --relname emqx --relvsn $(PKG_VSN) --upfrom $(RELUP_BASE_VERSIONS)
endif
endif
.PHONY: $(PROFILES:%=%-tar) $(PKG_PROFILES:%=%-tar)