Skip to content

Commit

Permalink
Add version annotations to scripts
Browse files Browse the repository at this point in the history
This lets tools like mix figure out which version is in path without
invoking rebar3 itself.
  • Loading branch information
ferd committed Apr 23, 2020
1 parent 6a56a62 commit 73c3613
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ main(_) ->
bootstrap_rebar3(),

%% Build rebar.app from rebar.app.src
{ok, App} = rebar_app_info:new(rebar, "3.13.0", filename:absname("_build/default/lib/rebar/")),
{ok, App} = rebar_app_info:new(rebar, "3.13.2", filename:absname("_build/default/lib/rebar/")),
rebar_otp_app:compile(rebar_state:new(), App),

%% Because we are compiling files that are loaded already we want to silence
Expand Down
1 change: 1 addition & 0 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
]}.

{escript_name, rebar3}.
{escript_comment, "%%Rebar3 3.13.2\n"}.
{escript_emu_args, "%%! +sbtu +A1\n"}.
%% escript_incl_extra is for internal rebar-private use only.
%% Do not use outside rebar. Config interface is not stable.
Expand Down
2 changes: 1 addition & 1 deletion src/rebar.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{application, rebar,
[{description, "Rebar: Erlang Build Tool"},
{vsn, "3.13.0"},
{vsn, "3.13.2"},
{modules, []},
{registered, []},
{applications, [kernel,
Expand Down
3 changes: 2 additions & 1 deletion src/rebar_prv_local_install.erl
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ format_error(Reason) ->
io_lib:format("~p", [Reason]).

bin_contents(OutputDir) ->
{ok, Vsn} = application:get_key(rebar, vsn),
<<"#!/usr/bin/env sh
## Rebar3 ", (iolist_to_binary(Vsn))/binary, "
erl -pz ", (rebar_utils:to_binary(OutputDir))/binary,"/*/ebin +sbtu +A1 -noshell -boot start_clean -s rebar3 main $REBAR3_ERL_ARGS -extra \"$@\"
">>.

Expand Down

0 comments on commit 73c3613

Please sign in to comment.