Parcourir la source

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

Zaiming Shi il y a 5 ans
Parent
commit
952c140138
2 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 2 0
      Makefile
  2. 3 1
      packages.mk

+ 2 - 0
Makefile

@@ -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

+ 3 - 1
packages.mk

@@ -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)