From ebe96a82240f04d057ec2f45fee42b45055b017e Mon Sep 17 00:00:00 2001 From: Louis-Philippe Gauthier Date: Mon, 23 Jan 2017 06:31:44 -0500 Subject: [PATCH] Tweak rebar.config and app.src to support hex.pm --- elvis.config | 6 ------ rebar.config | 6 ++---- rebar.config.script | 16 ++++++++++++++-- rebar.lock | 16 ++++++++-------- src/statsderl.app.src | 17 ++++++++--------- 5 files changed, 32 insertions(+), 29 deletions(-) diff --git a/elvis.config b/elvis.config index 8c825be..ec5daaf 100644 --- a/elvis.config +++ b/elvis.config @@ -20,12 +20,6 @@ {elvis_style, state_record_and_type}, {elvis_style, used_ignored_variable} ]}, - #{dirs => ["."], - filter => "rebar.config", - rules => [ - {elvis_project, no_deps_master_rebar, #{ignore => []}}, - {elvis_project, protocol_for_deps_rebar, #{ignore => []}} - ]}, #{dirs => ["."], filter => "elvis.config", rules => [ diff --git a/rebar.config b/rebar.config index ab8ae89..902e850 100644 --- a/rebar.config +++ b/rebar.config @@ -10,10 +10,8 @@ {coveralls_service_name, "travis-ci"}. {deps, [ - {granderl, ".*", - {git, "https://github.com/tokenrove/granderl.git", {tag, "v0.1.4"}}}, - {parse_trans, ".*", - {git, "https://github.com/uwiger/parse_trans.git", {tag, "3.0.0"}}} + {granderl, "0.1.5"}, + {parse_trans, "3.0.0"} ]}. {edoc_opts, [ diff --git a/rebar.config.script b/rebar.config.script index d829600..802f858 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -1,7 +1,19 @@ +Config = case erlang:function_exported(rebar3, main, 1) of + true -> + CONFIG; + false -> + [{deps, [ + {granderl, ".*", + {git, "https://github.com/tokenrove/granderl.git", {tag, "v0.1.5"}}}, + {parse_trans, ".*", + {git, "https://github.com/uwiger/parse_trans.git", {tag, "3.0.0"}}} + ]} | lists:keydelete(deps, 1, CONFIG)] +end, + case os:getenv("TRAVIS") of "true" -> JobId = os:getenv("TRAVIS_JOB_ID"), - lists:keystore(coveralls_service_job_id, 1, CONFIG, {coveralls_service_job_id, JobId}); + lists:keystore(coveralls_service_job_id, 1, Config, {coveralls_service_job_id, JobId}); _ -> - CONFIG + Config end. diff --git a/rebar.lock b/rebar.lock index 6c45557..d60eaea 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,8 +1,8 @@ -[{<<"granderl">>, - {git,"https://github.com/tokenrove/granderl.git", - {ref,"b44725cdd3ae6d2d4170e0d72ebb2fcad98d5ad2"}}, - 0}, - {<<"parse_trans">>, - {git,"https://github.com/uwiger/parse_trans.git", - {ref,"6f3645afb43c7c57d61b54ef59aecab288ce1013"}}, - 0}]. +{"1.1.0", +[{<<"granderl">>,{pkg,<<"granderl">>,<<"0.1.5">>},0}, + {<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.0.0">>},0}]}. +[ +{pkg_hash,[ + {<<"granderl">>, <<"F20077A68BD80B8D8783BD15A052813C6483771DEC1A5B837D307CBE92F14122">>}, + {<<"parse_trans">>, <<"9E96B1C9C3A0DF54E7B76F8F685D38BFA1EB21B31E042B1D1A5A70258E4DB1E3">>}]} +]. diff --git a/src/statsderl.app.src b/src/statsderl.app.src index 387b2a5..a893f70 100644 --- a/src/statsderl.app.src +++ b/src/statsderl.app.src @@ -1,12 +1,11 @@ {application, statsderl, [ - {description, "statsd client"}, - {vsn, "0.5.1"}, - {registered, []}, - {applications, [ - kernel, - stdlib, - granderl - ]}, + {applications, [kernel, stdlib, granderl]}, + {description, "High Performance Erlang StatsD Client"}, + {env, []}, + {licenses, ["MIT"]}, + {links, [{"GitHub", "https://github.com/lpgauth/statsderl"}]}, + {maintainers, ["Louis-Philippe Gauthier"]}, {mod, {statsderl_app, []}}, - {env, []} + {registered, []}, + {vsn, "0.5.1"} ]}.