From ebe242c18949893b814fb540a2f3992efd08c058 Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Mon, 12 Dec 2022 17:33:26 +0300 Subject: [PATCH 1/3] ci: require rebar3 3.19.0-emqx-1 Which supports running on OTP-24 and newer. --- Makefile | 2 +- get-rebar3 | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 47c3c5ae..3262b8cf 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ BUILD_WITHOUT_QUIC ?= true export BUILD_WITHOUT_QUIC REBAR = $(CURDIR)/rebar3 -REBAR_VERSION = 3.16.1-emqx-1 +REBAR_VERSION = 3.19.0-emqx-1 .PHONY: all all: compile diff --git a/get-rebar3 b/get-rebar3 index eb7f4724..f18fe9a6 100755 --- a/get-rebar3 +++ b/get-rebar3 @@ -10,7 +10,10 @@ cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/" DOWNLOAD_URL='https://github.com/emqx/rebar3/releases/download' download() { - curl --silent --show-error -f -L "${DOWNLOAD_URL}/${VERSION}/rebar3" -o ./rebar3 + local url="${DOWNLOAD_URL}/${VERSION}/rebar3" + + echo "Downloading rebar3 from '${url}' ..." + curl --silent --show-error -f -L "${url}" -o ./rebar3 } # get the version number from the second line of the escript From 2a1a605dae64254754a0e828a30526fc9ae421af Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Mon, 12 Dec 2022 17:46:01 +0300 Subject: [PATCH 2/3] ci: prefer system-wide rebar3 That way we won't need to actively track compatibility in repos which use `emqx-plugin-template` in CI / development workflows. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3262b8cf..f939f259 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ BUILD_WITHOUT_QUIC ?= true export BUILD_WITHOUT_QUIC -REBAR = $(CURDIR)/rebar3 +REBAR = $(or $(shell which rebar3 2>/dev/null),$(CURDIR)/rebar3) REBAR_VERSION = 3.19.0-emqx-1 .PHONY: all @@ -13,7 +13,8 @@ all: compile get-rebar3: @$(CURDIR)/get-rebar3 $(REBAR_VERSION) -$(REBAR): get-rebar3 +$(REBAR): + $(MAKE) get-rebar3 .PHONY: compile compile: $(REBAR) From f56a2598e45e4fc4de9b77af76eaad7adbe044ca Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Mon, 12 Dec 2022 17:46:51 +0300 Subject: [PATCH 3/3] ci: also allow to pin rebar3 through env vars In the name of increased flexibility. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f939f259..63ce45e1 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,8 @@ BUILD_WITHOUT_QUIC ?= true export BUILD_WITHOUT_QUIC -REBAR = $(or $(shell which rebar3 2>/dev/null),$(CURDIR)/rebar3) -REBAR_VERSION = 3.19.0-emqx-1 +REBAR ?= $(or $(shell which rebar3 2>/dev/null),$(CURDIR)/rebar3) +REBAR_VERSION ?= 3.19.0-emqx-1 .PHONY: all all: compile