Erlang Build Tools--系列6

 转载:https://bitbucket.org/basho/rebar/wiki/ReleaseHandling

 

Release Handling

Introducing reltool.config

Rebar produces the reltool.config configuration file in response to performing the create-node command. The reltool.config contains configuration information consumed by rebar, and Reltool (the release management tool introduced in the Erlang R13B distribution).

Create the application:

1


$
 ./rebar create-app appid
=
exemplar

Notice: The commands 'create-app' and 'create-node' can be seen in rebar_templater.erl . Also, the variables that may be supplied to these commands can be seen in the respective templates, simpleapp.template and simplenode.template .

And to create the node:

Manually create the rel directory:

1

2

$
 mkdir rel
$ cd rel

create the node:


$
 ../rebar create-node nodeid
=
exemplar

$ ls -lR
total 8
drwxr-xr-x 5 iw iw 170 13 Jan 13:33 overlay
-rw-r--r-- 1 iw iw 612 13 Jan 13:33 reltool.config

./overlay:
total 0
drwxr-xr-x 3 iw iw 102 13 Jan 13:33 bin
drwxr-xr-x 3 iw iw 102 13 Jan 13:33 erts-vsn
drwxr-xr-x 4 iw iw 136 13 Jan 13:33 etc

./overlay/bin:
total 8
-rw-r--r-- 1 iw iw 3368 13 Jan 13:33 exemplar

./overlay/erts-vsn:
total 0
drwxr-xr-x 4 iw iw 136 13 Jan 13:33 bin

./overlay/erts-vsn/bin:
total 16
-rw-r--r-- 1 iw iw 1118 13 Jan 13:33 erl
-rw-r--r-- 1 iw iw 2940 13 Jan 13:33 nodetool

./overlay/etc:
total 16
-rw-r--r-- 1 iw iw 334 13 Jan 13:33 app.config
-rw-r--r-- 1 iw iw 423 13 Jan 13:33 vm.args

To produce a release:

Add the following to rebar.config:

{sub_dirs, ["rel"]}.

and perform:

1

2

$
 ./rebar generate
==> rel (generate)

This will produce the target system exemplar within the rel directory:

1

2
3
4
5
6
7
8
9

$
 ls -l rel/exemplar/
total 0
drwxr-xr-x 3 iw iw 102 13 Jan 13:52 bin
drwxr-xr-x 8 iw iw 272 13 Jan 13:52 erts-5.7.4
drwxr-xr-x 3 iw iw 102 13 Jan 13:52 erts-vsn
drwxr-xr-x 4 iw iw 136 13 Jan 13:52 etc
drwxr-xr-x 33 iw iw 1122 13 Jan 13:52 lib
drwxr-xr-x 3 iw iw 102 13 Jan 13:52 log
drwxr-xr-x 4 iw iw 136 13 Jan 13:52 releases
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值