fix(build): relup for otp24 failed
The defination of `#application{}` record in systools.hrl is changed in OTP 24. So we need a rebar3 binary compiled with OTP 24.
This commit is contained in:
parent
3cf1fb2519
commit
d422e6e700
2
Makefile
2
Makefile
|
@ -1,5 +1,5 @@
|
||||||
$(shell $(CURDIR)/scripts/git-hooks-init.sh)
|
$(shell $(CURDIR)/scripts/git-hooks-init.sh)
|
||||||
REBAR_VERSION = 3.14.3-emqx-8
|
REBAR_VERSION = 3.18.0-emqx-1
|
||||||
REBAR = $(CURDIR)/rebar3
|
REBAR = $(CURDIR)/rebar3
|
||||||
BUILD = $(CURDIR)/build
|
BUILD = $(CURDIR)/build
|
||||||
SCRIPTS = $(CURDIR)/scripts
|
SCRIPTS = $(CURDIR)/scripts
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
VERSION="$1"
|
VERSION="$1"
|
||||||
|
REBAR3_FILENAME="${REBAR3_FILENAME:-rebar3}"
|
||||||
|
|
||||||
# ensure dir
|
# ensure dir
|
||||||
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
|
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
|
||||||
|
@ -10,7 +11,11 @@ cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
|
||||||
DOWNLOAD_URL='https://github.com/emqx/rebar3/releases/download'
|
DOWNLOAD_URL='https://github.com/emqx/rebar3/releases/download'
|
||||||
|
|
||||||
download() {
|
download() {
|
||||||
curl -f -L "${DOWNLOAD_URL}/${VERSION}/rebar3" -o ./rebar3
|
curl -f -L "${DOWNLOAD_URL}/${VERSION}/${REBAR3_FILENAME}" -o ./rebar3
|
||||||
|
}
|
||||||
|
|
||||||
|
version_gt() {
|
||||||
|
test "$(echo "$@" | tr " " "n" | sort -V | head -n 1)" != "$1";
|
||||||
}
|
}
|
||||||
|
|
||||||
# get the version number from the second line of the escript
|
# get the version number from the second line of the escript
|
||||||
|
@ -24,5 +29,10 @@ if [ -f 'rebar3' ] && [ "$(version)" = "$VERSION" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if version_gt "${OTP_VSN}" "24.0.0"; then
|
||||||
|
echo "$OTP_VSN is greater than 24.0.0"
|
||||||
|
REBAR3_FILENAME="rebar3_otp24.1.5"
|
||||||
|
fi
|
||||||
|
|
||||||
download
|
download
|
||||||
chmod +x ./rebar3
|
chmod +x ./rebar3
|
||||||
|
|
Loading…
Reference in New Issue