Dynamically build rebar3 if needed

Also tweaked `tz-erl` with some proposed updates from
https://github.com/choptastic/qdate_localtime/pull/1
This commit is contained in:
Jesse Gumm 2022-12-09 15:12:47 -06:00
parent cf9e726d1b
commit 3127dcddfb
6 changed files with 43 additions and 19 deletions

View file

@ -1,11 +1,24 @@
all:
all: rebar3
./rebar3 compile
check:
check: rebar3
./rebar3 eunit
dialyzer:
dialyzer: rebar3
./rebar3 dialyzer
publish:
publish: rebar3
./rebar3 hex publish
rebar3:
@(echo "Building rebar3...")
@(rm -fr tmp)
@(mkdir -p tmp)
@(cd tmp && \
git clone https://github.com/erlang/rebar3 && \
cd rebar3 && \
./bootstrap)
@(echo "Moving rebar3 executable locally (NOT installing system-wide)")
@(mv tmp/rebar3/rebar3 .)
@(echo "Cleaning up rebar3 remnants")
@(rm -fr tmp)