Erlang Rebar User Guide II: Making a release version
Full-Text Catalogs:
Https://github.com/rebar/rebar/wiki
Location of this chapter:
Https://github.com/rebar/rebar/wiki/Release-handling
How to use rebar to package and publish apps.
1 Viewing Erlang versions
$ ERLERLANG/OTP [erts-6.2] [source] [64-bit] [async-threads:10] [hipe] [Kernel-poll:false]eshell V6.2 (abort with ^G) 1> Q (). ok
2 Creating a Project
Follow the command below to create a new project Test_rebar:
$ mkdir Test_rebar $ cd test_rebar/$ CP: /rebar/rebar. $./rebar Create-app $ mkdir rel $ cd rel $: /rebar Create-node $ VI reltool.config $ CD. $ echo "{sub_dirs,[\" rel\ "]}." >rebar.config $./rebar Compile generate==> rel (generate) WARN: ' Generate ' command does not apply to directory ~/te St_rebar
Where, $ vi reltool.config is executed, find the following line:
{app, Mynode, [{mod_cond, app}, {Incl_cond, include}]}
Change to:
{app, Mynode, [{mod_cond, app}, {Incl_cond, include}, {Lib_dir, ' ... '}]}
3 run
$ pwd.. /test_rebar/rel/mynode/bin$./mynode start$./mynode attachattaching to/tmp//~/test_rebar/rel/mynode/erlang.pipe.1 ( ^d to exit) ([email protected]) 1> application:which_applications (). [{mynode,[],[]}, {SASL, "SASL CXC 138 One", "2.4.1"}, {stdlib, "ERTS CXC 138", "2.2"}, {kernel, "ERTS CXC 138 "3.0.3"}] ([email protected]) 2> Q (). OK ([email protected]) 3> [end]$./mynode start$./mynode Stopok
Erlang Rebar User Guide II: Making a release version