build: unsupported otp23 and otp24 casued `maybe_expr` introduced

This commit is contained in:
JimMoen 2024-05-15 18:21:00 +08:00
parent 8279d8c787
commit 4bc80ee483
No known key found for this signature in database
2 changed files with 2 additions and 11 deletions

View File

@ -4,17 +4,8 @@ set -euo pipefail
[ "${DEBUG:-0}" -eq 1 ] && set -x
## rebar3 tag 3.19.0-emqx-1 is compiled using latest official OTP-24 image.
## we have to use an otp24-compiled rebar3 because the defination of record #application{}
## in systools.hrl is changed in otp24.
OTP_VSN="${OTP_VSN:-$(./scripts/get-otp-vsn.sh)}"
case ${OTP_VSN} in
23*)
VERSION="3.16.1-emqx-1"
;;
24*)
VERSION="3.18.0-emqx-1"
;;
25*)
VERSION="3.19.0-emqx-9"
;;
@ -22,7 +13,7 @@ case ${OTP_VSN} in
VERSION="3.20.0-emqx-1"
;;
*)
echo "Unsupporetd Erlang/OTP version $OTP_VSN"
echo "Unsupported Erlang/OTP version $OTP_VSN"
exit 1
;;
esac

View File

@ -2,4 +2,4 @@
set -euo pipefail
erl -noshell -eval '{ok, Version} = file:read_file(filename:join([code:root_dir(), "releases", erlang:system_info(otp_release), "OTP_VERSION"])), io:fwrite(Version), halt().'
erl -noshell -eval '{ok, Version} = file:read_file(filename:join([code:root_dir(), "releases", erlang:system_info(otp_release), "OTP_VERSION"])), io:fwrite(Version), halt().'