Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to rebar3 while keeping backward compatibility to rebar2 #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ dump.rdb
.rebar
_rel
relx
_build
4 changes: 2 additions & 2 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
}.
{cover_enabled, true}.
{deps, [
{lager, ".*", {git, "https://github.com/basho/lager.git", {tag, "3.0.1"}}}
,{jsx, "2.*", {git, "https://github.com/talentdeficit/jsx.git", {tag, "v2.7.1"}}}
{lager, "3.0.1"}
,{jsx, "2.7.1"}
]}.
11 changes: 11 additions & 0 deletions rebar.config.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
case erlang:function_exported(rebar3, main, 1) of
true -> % rebar3
CONFIG;
false -> % rebar 2.x or older
%% Rebuild deps, possibly including those that have been moved to
%% profiles
[{deps, [
{lager, ".*", {git, "https://github.com/basho/lager.git", {tag, "3.0.1"}}}
,{jsx, ".*", {git, "https://github.com/talentdeficit/jsx.git", {tag, "v2.7.1"}}}
]} | [Config || {Key, _Value}=Config <- CONFIG, Key =/= deps]]
end.
10 changes: 10 additions & 0 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{"1.1.0",
[{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.7">>},1},
{<<"jsx">>,{pkg,<<"jsx">>,<<"2.7.1">>},0},
{<<"lager">>,{pkg,<<"lager">>,<<"3.0.1">>},0}]}.
[
{pkg_hash,[
{<<"goldrush">>, <<"349A351D17C71C2FDAA18A6C2697562ABE136FEC945F147B381F0CF313160228">>},
{<<"jsx">>, <<"30CA834AC0AC6D745E4103D62CCC123C81399E4C937B7751A0185EF16425EDA8">>},
{<<"lager">>, <<"480F0DFF5A53EBD5937EF6B469B18BC776F911BD0A8B29328900BA3E8BBF63C6">>}]}
].