manywaypark's Blog
개발, 검색, 함수

rebar - release node 생성

함수형 언어/Erlang 2014. 11. 26. 11:34 by manywaypark

자주하는 작업이 아니다보니 할 때마다 좀 헷갈리네.

일단 이렇게 해서 rel 디렉토리에 기본적인 파일 생성한다.

$ cd path/to/prj

$ mkdir rel ; cd $_

$ rebar create-node nodeid=myapp_node


그리고 아래처럼 library, version 등을 설정한다(diff 임)

diff --git a/rel/reltool.config b/rel/reltool.config

index 9260933..354b925 100644

--- a/rel/reltool.config

+++ b/rel/reltool.config

@@ -1,10 +1,10 @@

 %% -*- mode: erlang -*-

 %% ex: ft=erlang

 {sys, [

-       {lib_dirs, []},

+       {lib_dirs, ["../deps"]},

        {erts, [{mod_cond, derived}, {app_file, strip}]},

        {app_file, strip},

-       {rel, "myapp_node", "1",

+       {rel, "myapp_node", "0.0.1",

         [

          kernel,

          stdlib,

@@ -24,7 +24,7 @@

                            "^erts.*/bin/(dialyzer|typer)",

                            "^erts.*/(doc|info|include|lib|man|src)"]},

        {excl_app_filters, ["\.gitignore"]},

-       {app, myapp_node, [{mod_cond, app}, {incl_cond, include}]}

+       {app, myapp_node, [{mod_cond, app}, {incl_cond, include}, {lib_dir, ".."}]}

       ]}.

 

 {target_dir, "myapp_node"}.


이제는 rebar generate로 어디든 deploy할 수 있는 node를 생성할 수 있다. 멋지지 않은가?


happy hackin'

분류 전체보기 (306)
잡담 (20)
함수형 언어 (65)
emacs (16)
java (18)
tips & tricks (154)
사랑 (1)
가사 (0)
독서 (4)
mobile (6)
비함수형 언어 (2)

공지사항

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

04-27 00:17