Skip to content

Commit 73c3613

Browse files
committed
Add version annotations to scripts
This lets tools like mix figure out which version is in path without invoking rebar3 itself.
1 parent 6a56a62 commit 73c3613

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

bootstrap

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ main(_) ->
3535
bootstrap_rebar3(),
3636

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

4141
%% Because we are compiling files that are loaded already we want to silence

rebar.config

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
]}.
2424

2525
{escript_name, rebar3}.
26+
{escript_comment, "%%Rebar3 3.13.2\n"}.
2627
{escript_emu_args, "%%! +sbtu +A1\n"}.
2728
%% escript_incl_extra is for internal rebar-private use only.
2829
%% Do not use outside rebar. Config interface is not stable.

src/rebar.app.src

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{application, rebar,
55
[{description, "Rebar: Erlang Build Tool"},
6-
{vsn, "3.13.0"},
6+
{vsn, "3.13.2"},
77
{modules, []},
88
{registered, []},
99
{applications, [kernel,

src/rebar_prv_local_install.erl

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ format_error(Reason) ->
6262
io_lib:format("~p", [Reason]).
6363

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

0 commit comments

Comments
 (0)