Code Monkey home page Code Monkey logo

rebar3_run's Introduction

rebar3_run

Run a release with one simple command.

Build

$ rebar3 compile

Use

Add the plugin to your rebar config or ~/.config/rebar3/rebar.config:

{plugins, [
    rebar3_run
]}.

Assuming you have a relx config section in your rebar.config with extended_start_script set to true:

{relx, [{release, {<NAME>, <VERSION>}, [<YOUR APP NAME>]},
        {dev_mode, true},
        {include_erts, false},
        {extended_start_script, true}]}.

Then just call your plugin directly in an existing project:

$ rebar3 run
===> Fetching rebar3_run
===> Compiling rebar3_run
===> Starting relx build process ...
===> Resolving OTP Applications from directories:
.....
Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.4  (abort with ^G)
(<RELEASE NAME>@127.0.0.1)1>

rebar3_run's People

Contributors

f3c0 avatar paulo-ferraz-oliveira avatar tsloughter avatar zanfa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rebar3_run's Issues

Make -related warning #2

If you run make with strict enough options you get

Makefile:62: warning: undefined variable 'V'
Makefile:62: warning: undefined variable 'c_verbose_'
Makefile:62: warning: undefined variable 'CPPFLAGS'
Makefile:59: warning: undefined variable 'V'
Makefile:59: warning: undefined variable 'link_verbose_'

I'm not sure any of those is on purpose (they can be silenced with ?=, I guess) but am willing to fix if you let me know what we want here.


Note: this does not exit. It's just a warning, even if avoidable.

"rebar3 run" builds release then exits

rj@RJ3000 ~/src/countess
$ DEBUG=1 rebar3 run
===> Verifying dependencies...
===> Compiling countess
===> erl_opts [debug_info,debug_info]
===> Files to compile first: []
===> Starting relx build process ...
===> Resolving OTP Applications from directories:
          /Users/rj/src/countess/_build/default/lib
          /Users/rj/src/countess/apps
          /usr/local/Cellar/erlang/17.4.1/lib/erlang/lib
          /Users/rj/src/countess/_build/default/rel
===> Resolved countess-0.1.0
===> Dev mode enabled, release will be symlinked
===> release successfully created!
rj@RJ3000 ~/src/countess
$ echo $?
0
rj@RJ3000 ~/src/countess
$

Running _build/default/rel/countess/bin/countess console works as expected.

Here's the repo, created from "rebar3 new release" with one added module, where I noticed this:
https://github.com/RJ/erlang-countess/tree/e75f6bcfa41763bb69df446a3abfd97fc964ad4c

Release started with rebar3_run cannot be killed with Ctrl+C

The started VM cannot be killed with Ctrl+C when starting a release with rebar3 run instead of rebar3 release && _build/default/rel/myrelease/bin/myrelease. Instead, q(). in the console has to be used.

$ rebar3 --version
rebar 3.3.2 on Erlang/OTP 19 Erts 8.1
$ rebar3 plugins list
--- Local plugins ---
rebar3_run
$ rebar3 plugins upgrade rebar3_run
===> No upgrade needed for rebar3_run

Not sure how to figure out the version of the plugin...

hex.pm has old version

Hi,
The package on hex.pm seems to lack commit f742c95 (the FreeBSD compat stuff) - could you publish the latest version? :)

Make -related warning

I'm not sure what's causing this, but wanted to leave it here in case somebody's seen it already (do close if silly).

make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.

Is there something we can do to get rid of that warning? It happens while rebar3_run is getting compiled.

Doesn't build with OTP 23

The plugin doesn't compile when using Erlang/OTP 23:

make: Entering directory '/tmp/myrel/_build/default/plugins/rebar3_run/c_src'
cc -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes -fPIC -I /home/xmpp/opt/erlang/lib/erlang/erts-11.0.2/include/ -I /home/xmpp/opt/erlang/lib/erlang/lib/erl_interface-4.0/include  -c -o /tmp/myrel/_build/default/plugins/rebar3_run/c_src/rebar3_run.o /tmp/myrel/_build/default/plugins/rebar3_run/c_src/rebar3_run.c
cc /tmp/myrel/_build/default/plugins/rebar3_run/c_src/rebar3_run.o -shared -L /home/xmpp/opt/erlang/lib/erlang/lib/erl_interface-4.0/lib -lerl_interface -lei -o /tmp/myrel/_build/default/plugins/rebar3_run/c_src/../priv/rebar3_run.so
/usr/bin/ld: cannot find -lerl_interface
collect2: error: ld returned 1 exit status
make: *** [Makefile:59: /tmp/myrel/_build/default/plugins/rebar3_run/c_src/../priv/rebar3_run.so] Error 1
make: Leaving directory '/tmp/myrel/_build/default/plugins/rebar3_run/c_src'
===> Hook for compile failed!

===> Plugin rebar3_run not available. It will not be used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.