Skip to content
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

Annotate generated escript with last release #2265

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

ferd
Copy link
Collaborator

@ferd ferd commented Apr 23, 2020

End result should allow to look like this:

$ head -n 3 rebar3
#!/usr/bin/env escript
%% Rebar3 3.14.0-rc1
%%! +sbtu +A1

This will allow tools like mix to read the top of the file to know the
version being used in the current path (when using features that aren't
forwards-compatible) without having to invoke the tool itself.

The same change works with local install, but with the full dynamic version and by using ## for comment width:

$ head -n 3 /home/ferd/.cache/rebar3/bin/rebar3
#!/usr/bin/env sh
## Rebar3 3.14.0-rc1+build.4599.ref6b0f90d
erl -pz /home/ferd/.cache/rebar3/lib/*/ebin +sbtu +A1 -noshell -boot start_clean -s rebar3 main $REBAR3_ERL_ARGS -extra "$@"

To be backported to 3.13.2 as well.

End result should allow to look like this:

    $ head -n 3 rebar3
    #!/usr/bin/env escript
    %% Rebar3 3.14.0-rc1
    %%! +sbtu +A1

This will allow tools like mix to read the top of the file to know the
version being used in the current path (when using features that aren't
forwards-compatible) without having to invoke the tool itself.

The version (full dynamic one) is also added to the local install:

    $ head -n 2 /home/ferd/.cache/rebar3/bin/rebar3
    #!/usr/bin/env sh
    ## Rebar3 3.14.0-rc1+build.4599.ref6b0f90d

The `##` comments are used to keep a fixed width over the other form.

To be backported to 3.13.2 as well.
@ferd ferd force-pushed the track-vsn-in-escript branch from 6b0f90d to 488b167 Compare April 23, 2020 14:45
@ferd ferd merged commit aae3e3d into erlang:master Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants