Skip to content

Instantly share code, notes, and snippets.

@namjae
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save namjae/a91c6472a39fba67ae2b to your computer and use it in GitHub Desktop.

Select an option

Save namjae/a91c6472a39fba67ae2b to your computer and use it in GitHub Desktop.
rebar 쓰기
#!/bin/bash
# init a prj w/ rebar, git flow
cd /usr/local/bin
wget https://github.com/rebar/rebar/wiki/rebar
chmod u+x rebar
rebar -c # lists all commands
mkdir /path/to/prj
cd $_
rebar create-app appid=myapp # creates project named 'myapp'
cd myapp
rebar compile # build
mkdir rel
rebar create-node nodeid=myapp
# you should edit reltool.config (refer the file reltool.config.FIRST.DIFF)
rebar generate # creates node(release)
diff --git a/rel/reltool.config b/rel/reltool.config
index 6ff941d..a08a7fe 100755
--- a/rel/reltool.config
+++ b/rel/reltool.config
@@ -1,7 +1,7 @@
%% -*- mode: erlang -*-
%% ex: ft=erlang
{sys, [
- {lib_dirs, []},
+ {lib_dirs, ["../deps"]},
{erts, [{mod_cond, derived}, {app_file, strip}]},
{app_file, strip},
{rel, "myapp", "1",
@@ -24,7 +24,7 @@
"^erts.*/bin/(dialyzer|typer)",
"^erts.*/(doc|info|include|lib|man|src)"]},
{excl_app_filters, ["\.gitignore"]},
- {app, myapp, [{mod_cond, app}, {incl_cond, include}]}
+ {app, myapp, [{mod_cond, app}, {incl_cond, include}, {lib_dir, ".."}]}
]}.
{target_dir, "myapp"}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment