Skip to content

Commit

Permalink
Merge pull request #23 from emqx/chore/build-match-vsn
Browse files Browse the repository at this point in the history
chore: relax build script check strictness
  • Loading branch information
keynslug authored Jan 31, 2025
2 parents 878c80e + 812567f commit 639604c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ VERSION="$(git describe --tag)"
CHECK_VSN="$(cat <<-EOF
{ok, L} = file:consult("rebar.config"),
{_, Vsn} = lists:keyfind(escript_comment, 1, L),
case Vsn =:= "%%Rebar3 ${VERSION}" of
case string:trim(Vsn) =:= "%%Rebar3 ${VERSION}" of
true -> halt(0);
false ->
io:format("version mismatch in rebar.config\n"),
io:format("escript_comment: " ++ Vsn ++ "\n"),
io:format("git descrite: ${VERSION}"),
io:format("git describe: ${VERSION}"),
halt(1)
end.
EOF
Expand All @@ -28,8 +28,7 @@ erl -noshell -eval "${CHECK_VSN}"

if [ "${1:-}" = "--in-docker" ]; then
#shellcheck disable=SC2086
exec docker run $maybeit --rm -v "$(pwd):/src" --workdir /src erlang:25 git config --global --add safe.directory /src && ./build
exec docker run $maybeit --rm -v "$(pwd):/src" --workdir /src erlang:27 git config --global --add safe.directory /src && ./build
fi

export REBAR3_PROJECT_BUILD_STAMPR=ignore
./bootstrap

0 comments on commit 639604c

Please sign in to comment.