Skip to content

Commit

Permalink
rebar3 support working with cwd rebar3 escript
Browse files Browse the repository at this point in the history
  • Loading branch information
tsloughter committed May 31, 2015
1 parent 7689621 commit e41b42e
Show file tree
Hide file tree
Showing 5 changed files with 170 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 1,5 @@
_build
log
deps/*
rel/vernemq
rel/vars/dev*_vars.config
Expand Down
38 changes: 21 additions & 17 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,16 1,16 @@
%%-*- mode: erlang -*-
{sub_dirs, ["rel"]}.
{require_otp_vsn, "17"}.
{erl_opts, [debug_info, fail_on_warning]}.
{plugins, [
{ rebar3_cuttlefish, ".*", {git, "git://github.com/tsloughter/rebar3_cuttlefish.git", {branch, "master"}}}
{rebar3_cuttlefish, ".*", {git, "git://github.com/tsloughter/rebar3_cuttlefish.git", {branch, "master"}}}
]}.

{deps, [
{cuttlefish, ".*", {git, "git://github.com/tsloughter/cuttlefish.git", {branch, "develop"}}},
{node_package,".*", {git,"git://github.com/dergraf/node_package.git", {branch, "develop"}}},
{lager_syslog, "2.0.3", {git, "git://github.com/basho/lager_syslog.git", {tag, "2.0.3"}}},
{eper, "0.87.0", {git, "https://github.com/massemanet/eper.git", {tag, "0.87.0"}}},
%% recon is 'currently' included in the ESL Erlang 17.4 distribution package
%% recon is 'currently' included in the ESL Erlang 17.4 distribution package
%% comment the following line if you are using this ESL Erlang version
{recon, ".*", {git, "git://github.com/ferd/recon.git", {tag, "2.2.1"}}},

Expand All @@ -23,15 23,14 @@
{vmq_systree, ".*", {git, "git://github.com/erlio/vmq_systree.git", {branch, "rebar3-support"}}}
]}.

{relx,
[{dev_mode, false},
{extended_start_script, true},
{include_erts, true},
{release, {"vernemq", "0.0.1"},
{overrides, [{override, setup, [{post_hooks, []}]},
{override, vmq_passwd, [{post_hooks, [{compile, "gcc c_src/vmq_passwd.c -lcrypto -o c_src/vmq_passwd"}]}]}]}.

{provider_hooks, [{post, [{release, cuttlefish}]}]}.

{relx,
[{release, {"vernemq", "0.0.1"},
[
kernel,
stdlib,
lager,
sasl,
vmq_server,
{cuttlefish, load},
Expand All @@ -45,23 44,28 @@
{eper, load}
]},

{dev_mode, false},
{include_erts, true},
{generate_start_script, false},
{include_nodetool, true},

{overlay_vars, "vars.config"},
{overlay, [
{mkdir, "data/broker"},
{mkdir, "data/msgstore"},
{mkdir, "log/sasl"},
%% Copy base files for starting and interacting w/ node
{copy, "_build/default/lib/node_package/priv/base/erl",
"{{erts_vsn}}/bin/erl"},
{copy, "_build/default/lib/node_package/priv/base/nodetool",
"{{erts_vsn}}/bin/nodetool"},

{template, "_build/default/lib/node_package/priv/base/runner",
"bin/vernemq"},
{template, "_build/default/lib/node_package/priv/base/nodetool",
"erts-{{erts_vsn}}/bin/nodetool"},
{template, "_build/default/lib/node_package/priv/base/env.sh",
"lib/env.sh"},
{template, "_build/default/lib/node_package/priv/base/app_epath.sh",
"lib/app_epath.sh"},

{template, "files/vmq-admin", "bin/vmq-admin"},
{copy, "_build/default/bin/cuttlefish", "erts-{{erts_vsn}}/bin/cuttlefish"},

{copy, "_build/default/lib/vmq_acl/priv/default.acl",
"etc/vmq.acl"},
Expand All @@ -84,10 88,10 @@
{template, "_build/default/lib/vmq_graphite/priv/vmq_graphite.schema", "lib/18-vmq_graphite.schema"},

{template, "files/vmq.schema", "lib/30-vmq.schema"},

{template, "_build/default/lib/cuttlefish/priv/erlang_vm.schema", "lib/31-erlang_vm.schema"},
{template, "_build/default/lib/riak_sysmon/priv/riak_sysmon.schema", "lib/32-riak_sysmon.schema"},

{mkdir, "lib/erlio-patches"}
]}
]}.

144 changes: 144 additions & 0 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -0,0 1,144 @@
[{<<"bear">>,
{git,"git://github.com/boundary/bear.git",
{ref,"119234548783af19b8ec75c879c5062676b92571"}},
3},
{<<"setup">>,
{git,"git://github.com/uwiger/setup.git",
{ref,"51ee7c9f64d2bbe9dcbb58c278e8fbfd4d0ca5e2"}},
2},
{<<"riak_dt">>,
{git,"git://github.com/basho/riak_dt.git",
{ref,"f7981d4ad7407ddc085f133f204dd71bf9d50c56"}},
2},
{<<"ranch">>,
{git,"git://github.com/ninenines/ranch.git",
{ref,"adf1822defc2b7cfdc7aca112adabfa1d614043c"}},
2},
{<<"parse_trans">>,
{git,"git://github.com/uwiger/parse_trans.git",
{ref,"82cc00264aa1bad8fc5c0739b7541feb4a843432"}},
2},
{<<"meck">>,
{git,"git://github.com/eproxus/meck.git",
{ref,"dde759050eff19a1a80fd854d7375174b191665d"}},
2},
{<<"goldrush">>,
{git,"git://github.com/DeadZen/goldrush.git",
{ref,"71e63212f12c25827e0c1b4198d37d5d018a7fec"}},
2},
{<<"folsom">>,
{git,"git://github.com/boundary/folsom",
{ref,"38e2cce7c64ce1f0a3a918d90394cfc0a940b1ba"}},
2},
{<<"eleveldb">>,
{git,"git://github.com/helium/eleveldb.git",
{ref,"4e199ab1518060d348ae0f9719d2cbf9f098e00d"}},
2},
{<<"edown">>,
{git,"git://github.com/esl/edown.git",
{ref,"4cb4ad67382590d92228ea6c56225376bd9f5685"}},
2},
{<<"cowlib">>,
{git,"git://github.com/ninenines/cowlib.git",
{ref,"d544a494af4dbc810fc9c15eaf5cc050cced1501"}},
2},
{<<"vmq_plugin">>,
{git,"git://github.com/erlio/vmq_plugin.git",
{ref,"6ae0c3a81b83d90715bf5b513859b00a9cb11462"}},
1},
{<<"vmq_commons">>,
{git,"git://github.com/erlio/vmq_commons.git",
{ref,"3c1b3b8f3aaddaca1446b54045764f332e4f702f"}},
1},
{<<"syslog">>,
{git,"git://github.com/Vagabond/erlang-syslog.git",
{ref,"918c9b453e0811b24f2c99b35b712b0ef9f29c7e"}},
1},
{<<"riak_sysmon">>,
{git,"git://github.com/basho/riak_sysmon.git",
{ref,"26a58bcaba96d07df885f7b3db4d4306f995ce14"}},
1},
{<<"plumtree">>,
{git,"git://github.com/dergraf/plumtree.git",
{ref,"1236aa1022ee8bcfbbc128573608c1d0ff4ed0ea"}},
1},
{<<"neotoma">>,
{git,"git://github.com/seancribbs/neotoma.git",
{ref,"760928ec8870da02eb11bccb501e2700925d06c6"}},
1},
{<<"lager">>,
{git,"git://github.com/basho/lager.git",
{ref,"b6b6cebcb27ccff8acc59ae775acebc2f52e4926"}},
1},
{<<"jobs">>,
{git,"git://github.com/uwiger/jobs.git",
{ref,"97fe71dc08393a7449fcd735455b3538140b1fea"}},
1},
{<<"getopt">>,
{git,"git://github.com/jcomellas/getopt.git",
{ref,"659a28f4145bc9843598972854299dc4ea77e4cb"}},
1},
{<<"exometer_core">>,
{git,"git://github.com/Feuerlabs/exometer_core.git",
{ref,"88588f26f226210a1fc9e70271d8a0611ba83d30"}},
1},
{<<"epmdpxy">>,
{git,"git://github.com/dergraf/epmdpxy",
{ref,"88118621bbf4ed1c98418ca2883b851bcca674a2"}},
1},
{<<"cowboy">>,
{git,"git://github.com/ninenines/cowboy.git",
{ref,"5ff3fdd91e20a137b6378c7271826c1d94d4e3d2"}},
1},
{<<"clique">>,
{git,"git://github.com/basho/clique.git",
{ref,"3af4db8ea0f74aca42f6713446dcd5915c795a74"}},
1},
{<<"vmq_systree">>,
{git,"git://github.com/erlio/vmq_systree.git",
{ref,"15bfdeb1a7c0e48c18c59a6e992e3e1553d45fe2"}},
0},
{<<"vmq_snmp">>,
{git,"git://github.com/erlio/vmq_snmp.git",
{ref,"cdb58eba04ac96b3d777479bd811be3faa2661a5"}},
0},
{<<"vmq_server">>,
{git,"git://github.com/erlio/vmq_server.git",
{ref,"9c8970df2185973e6aa9e6063f3b5fe8bf9bdcfd"}},
0},
{<<"vmq_passwd">>,
{git,"git://github.com/erlio/vmq_passwd.git",
{ref,"2d0e8fe7f4583f4ce855a972a41b4620a2ceadda"}},
0},
{<<"vmq_graphite">>,
{git,"git://github.com/erlio/vmq_graphite.git",
{ref,"214989868da3f6de418fd14082338d5cce625e37"}},
0},
{<<"vmq_bridge">>,
{git,"git://github.com/erlio/vmq_bridge.git",
{ref,"4d264401fe003f622bf107828ce419c3e3152f31"}},
0},
{<<"vmq_acl">>,
{git,"git://github.com/erlio/vmq_acl.git",
{ref,"7bee6fc5c0dfc2288a04084d42832b6b3be44de8"}},
0},
{<<"recon">>,
{git,"git://github.com/ferd/recon.git",
{ref,"3578fa86ad408d98e0512ded0b2f2c5b834a84ad"}},
0},
{<<"node_package">>,
{git,"git://github.com/tsloughter/node_package.git",
{ref,"28491b47e5c569fa5bef5dc1a120576d55d710a8"}},
0},
{<<"lager_syslog">>,
{git,"git://github.com/basho/lager_syslog.git",
{ref,"fa2e7e3daee0d0a59dadb820fd3381eac4a65770"}},
0},
{<<"eper">>,
{git,"https://github.com/massemanet/eper.git",
{ref,"55e3f69df5e3bcb74b42d2ba056c076298ed6ea7"}},
0},
{<<"cuttlefish">>,
{git,"git://github.com/tsloughter/cuttlefish.git",
{ref,"f5f6fdc1b0dd8ebe909b81f0b38f5715d4e869e6"}},
0}].
Binary file modified rebar3
Binary file not shown.
5 changes: 3 additions & 2 deletions vars.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 17,9 @@
%%
%% bin/vernemq
%%
{runner_script_dir, "\`cd \\`dirname $0\\` && /bin/pwd\`"}.
{runner_base_dir, "{{runner_script_dir}}/.."}.
{runner_script_dir, "$(cd `dirname $0` ; /bin/pwd)"}.
{runner_base_dir, "$(cd `dirname $0` ; /bin/pwd)/.."}.
{runner_bin_dir, "$RUNNER_SCRIPT_DIR/"}.
{runner_etc_dir, "$RUNNER_BASE_DIR/etc"}.
{runner_log_dir, "$RUNNER_BASE_DIR/log"}.
{runner_lib_dir, "$RUNNER_BASE_DIR/lib"}.
Expand Down

0 comments on commit e41b42e

Please sign in to comment.