Skip to content

Commit

Permalink
Merge pull request #107 from keynslug/ci/update-rebar3
Browse files Browse the repository at this point in the history
ci: prefer system-wide rebar3
  • Loading branch information
keynslug authored Dec 12, 2022
2 parents 32ae0ef + f56a259 commit e7c17ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
BUILD_WITHOUT_QUIC ?= true
export BUILD_WITHOUT_QUIC

REBAR = $(CURDIR)/rebar3
REBAR_VERSION = 3.16.1-emqx-1
REBAR ?= $(or $(shell which rebar3 2>/dev/null),$(CURDIR)/rebar3)
REBAR_VERSION ?= 3.19.0-emqx-1

.PHONY: all
all: compile
Expand 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)
Expand Down
5 changes: 4 additions & 1 deletion get-rebar3
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e7c17ce

Please sign in to comment.