Skip to content

Instantly share code, notes, and snippets.

@hiroeorz
Created June 17, 2012 11:49
Show Gist options
  • Save hiroeorz/2944310 to your computer and use it in GitHub Desktop.
Save hiroeorz/2944310 to your computer and use it in GitHub Desktop.
Erlangリリースパッケージ生成ツール用設定ファイルのサンプル
{sys, [
{lib_dirs, ["../deps"]}, %% depsを追加
{erts, [{mod_cond, derived}, {app_file, strip}]},
{app_file, strip},
{rel, "hogeapplication", "0.1",
[
%% 標準で使うライブラリも全て追加
kernel,
stdlib,
sasl,
compiler,
crypto,
ssl,
public_key,
inets,
syntax_tools,
%% 自分で組み込んだライブラリも、直接依存しないものも含めて全て追加
poolboy,
epgsql,
postgres_pool,
hogeapplication
]},
{rel, "start_clean", "",
[
kernel,
stdlib
]},
{boot_rel, "hogeapplication"},
{profile, embedded},
{incl_cond, exclude},
{excl_archive_filters, [".*"]}, %% Do not archive built libs
{excl_sys_filters, ["^bin/.*", "^erts.*/bin/(dialyzer|typer)",
"^erts.*/(doc|info|include|lib|man|src)"]},
{excl_app_filters, ["\.gitignore"]},
%% 標準で使うライブラリも全て追加
{app, kernel, [{incl_cond, include}]},
{app, stdlib, [{incl_cond, include}]},
{app, sasl, [{incl_cond, include}]},
{app, compiler, [{incl_cond, include}]},
{app, crypto, [{incl_cond, include}]},
{app, ssl, [{incl_cond, include}]},
{app, public_key, [{incl_cond, include}]},
{app, inets, [{incl_cond, include}]},
{app, syntax_tools, [{incl_cond, include}]},
%% 自分で組み込んだライブラリも、直接依存しないものも含めて全て追加
{app, poolboy, [{incl_cond, include}]},
{app, epgsql, [{incl_cond, include}]},
{app, postgres_pool, [{incl_cond, include}]},
{app, hogeapplication, [{incl_cond, include},{lib_dir, ".."}]} %%R15B以上ではこのように修正
]}.
{target_dir, "hogeapplication"}.
{overlay, [
{mkdir, "log/sasl"},
{copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"},
{copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"},
{copy, "files/hogeapplication", "bin/hogeapplication"},
{copy, "files/hogeapplication.cmd", "bin/hogeapplication.cmd"},
{copy, "files/start_erl.cmd", "bin/start_erl.cmd"},
{copy, "files/install_upgrade.escript", "bin/install_upgrade.escript"},
{copy, "files/sys.config", "releases/\{\{rel_vsn\}\}/sys.config"},
{copy, "files/vm.args", "releases/\{\{rel_vsn\}\}/vm.args"}
]}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment