Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
waisbrot committed Sep 12, 2016
2 parents ec61e8a + 9d7187c commit 693619e
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ src/eini_lexer.erl
ebin/*.app
.eunit
deps
/_build
/TEST-*.xml
.rebar
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ language: erlang
notifications:
email: false
otp_release:
- R15B01
- R15B
- R14B04
- R14B03
- R14B02
- R14B01
branches:
only:
- develop
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
.PHONY: all deps compile xref eunit clean distclean qc build

# covertool has warnigs, so compile first
all: deps
cd deps/covertool && ../../rebar compile
@./rebar compile
make xref
make eunit
all: deps compile-all xref eunit

deps:
@./rebar update-deps
@./rebar get-deps

compile-all:
@./rebar compile

compile:
@./rebar compile skip_deps=true

Expand Down
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ Result form::
History
=======

current
-------

:release: 20XX-XX-XX

- Misc changes for travis-ci

1.2.1
-----

Expand Down
31 changes: 17 additions & 14 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
%% -*- mode: erlang; -*-
{erl_opts, [warnings_as_errors,
warn_export_all,
warn_unused_import,
warn_untyped_record]}.
warn_unused_import
%% warn_untyped_record
]}.
{yrl_opts, [{verbose, true}]}.

{xref_checks, [undefined_function_calls]}.

{clean_files, [".eunit/*", "ebin/*.beam"]}.

{eunit_opts, [{report,{eunit_surefire,[{dir,"."}]}}]}.

{cover_enabled, true}.

{plugins, [rebar_covertool]}.
{covertool_eunit, ".eunit/eunit.coverage.xml"}.

{edoc_opts, [{dialyzer_specs, all},
{report_missing_type, true},
{report_type_mismatch, true},
Expand All @@ -25,9 +20,17 @@

{deps,
[
{proper,
".*", {git, "git://github.com/manopapad/proper.git", {branch, "master"}}},

{covertool,
".*", {git, "https://github.com/idubrov/covertool.git", {branch, "master"}}}
]}.

{profiles, [
{test, [
{eunit_opts, [{report,{eunit_surefire,[{dir,"."}]}}]}
,{cover_enabled, true}
,{plugins, [rebar_covertool]}
,{covertool_eunit, ".eunit/eunit.coverage.xml"}
,{deps, [
{proper, {git, "https://github.com/manopapad/proper.git", {ref, "v1.2"}}},
{covertool, {git, "https://github.com/idubrov/covertool.git", {branch, "master"}}}
]}
]}
]}.
31 changes: 31 additions & 0 deletions rebar.config.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
%% -*- mode: erlang; -*-
case erlang:function_exported(rebar3, main, 1) of
true ->
%% rebar3
CONFIG;
false ->
%% rebar 2.x or older
%% rebuild deps
Rebar3Deps = proplists:get_value(deps, CONFIG),
Rebar3TestProf = proplists:get_value(test, proplists:get_value(profiles, CONFIG)),
{value, {deps, Rebar3TestDeps}, Rebar3TestProf2} = lists:keytake(deps, 1, Rebar3TestProf),

%% whenever adding a new Hex package dependency, this fun should be
%% updated
HexToRepo = fun(proper) -> "https://github.com/manopapad/proper.git";
(covertool) -> "https://github.com/idubrov/covertool.git"
end,

ConvertDep =
fun({DepName, {git, Repo, {ref, Tag}}}) ->
{DepName, ".*", {git, Repo, {tag, Tag}}};
({DepName, {git, Repo, {branch, Branch}}}) ->
{DepName, ".*", {git, Repo, {branch, Branch}}};
({HexDepName, HexDepVersion}) ->
{HexDepName, ".*", {git, HexToRepo(HexDepName), {tag, HexDepVersion}}}
end,

Rebar2Deps = [ ConvertDep(Dep) || Dep <- Rebar3Deps ++ Rebar3TestDeps ],

lists:keystore(deps, 1, CONFIG, {deps, Rebar2Deps}) ++ Rebar3TestProf2
end.
1 change: 1 addition & 0 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[].
6 changes: 4 additions & 2 deletions src/eini.app.src
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{application, eini, [
{description, "An Erlang INI parser"},
{vsn, "1.2.1"},
{vsn, git},
{applications, [kernel, stdlib]},
{modules, []},
{registered, []},
{mod, {eini_app, []}}
{mod, {eini_app, []}},
{licenses, ["Apache 2.0"]},
{links, [{"Github", "https://github.com/erlcloud/eini"}]}
]}.

0 comments on commit 693619e

Please sign in to comment.