Skip to content

chore: relax build script check strictness #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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