Skip to content

Commit

Permalink
Merge pull request #198 from id/chore-allow-rebar-version-override
Browse files Browse the repository at this point in the history
chore: allow user to override rebar version
  • Loading branch information
keynslug authored Dec 8, 2022
2 parents 9272a03 + 0f7edfd commit d6014b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
12 changes: 4 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
REBAR = $(CURDIR)/rebar3
REBAR_VERSION = 3.14.3-emqx-7
REBAR ?= $(CURDIR)/rebar3
REBAR_VERSION ?= 3.14.3-emqx-7

.PHONY: all
all: release
Expand All @@ -8,13 +8,9 @@ release: compile
$(REBAR) as emqtt_bench tar
@$(CURDIR)/scripts/rename-package.sh

compile: $(REBAR) unlock
compile: $(REBAR)
$(REBAR) compile

.PHONY: unlock
unlock:
$(REBAR) unlock

.PHONY: clean
clean: distclean

Expand All @@ -32,6 +28,6 @@ docker:

.PHONY: ensure-rebar3
ensure-rebar3:
@$(CURDIR)/scripts/ensure-rebar3.sh $(REBAR_VERSION)
$(CURDIR)/scripts/ensure-rebar3.sh $(REBAR_VERSION)

$(REBAR): ensure-rebar3
6 changes: 3 additions & 3 deletions rebar.config.script
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ Profiles = {profiles,[ {escript, []}
, cowlib
| [ quicer || IsQuicSupp ]
] }
, {overlay_vars,[ {runner_root_dir, "$(cd $(dirname $(readlink $0 || echo $0))/..; pwd -P)"}
, {runner_escript_dir, "$RUNNER_ROOT_DIR/escript"}
]}
, {overlay_vars_values, [ {runner_root_dir, "$(cd $(dirname $(readlink $0 || echo $0))/..; pwd -P)"}
, {runner_escript_dir, "$RUNNER_ROOT_DIR/escript"}
]}
, {overlay, [ {mkdir, "bin"}
, {mkdir, "escript"}
, {copy, "_build/emqtt_bench/bin", "escript"}
Expand Down

0 comments on commit d6014b8

Please sign in to comment.