Skip to content

Commit 35ef363

Browse files
author
Tuncer Ayaz
committed
Refactor ci support
1 parent c64c809 commit 35ef363

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ otp_release:
66
- R15B
77
- R14B04
88
- R14B03
9-
before_script: "./bootstrap"
9+
script: "make all deps test"

Makefile

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
.PHONY: dialyzer_warnings xref_warnings
1+
.PHONY: dialyzer_warnings xref_warnings deps test
2+
3+
REBAR=$(PWD)/rebar
4+
RETEST=$(PWD)/deps/retest/retest
5+
EUNIT_DIR=$(PWD)/.eunit
6+
RETEST_DIR=$(PWD)/.rt.work
27

38
all:
49
./bootstrap
@@ -9,7 +14,7 @@ clean:
914
debug:
1015
@./bootstrap debug
1116

12-
check: debug xref dialyzer
17+
check: debug xref dialyzer deps test
1318

1419
xref:
1520
@./rebar xref
@@ -24,4 +29,12 @@ dialyzer_warnings:
2429
binary: VSN = $(shell ./rebar -V)
2530
binary: clean all
2631
cp rebar ../rebar.wiki/rebar
27-
(cd ../rebar.wiki && git commit -m "Update $(VSN)" rebar)
32+
(cd ../rebar.wiki && git commit -m "Update $(VSN)" rebar)
33+
34+
deps:
35+
REBAR_EXTRA_DEPS=1 ./rebar get-deps
36+
cd deps/retest && $(REBAR) compile escriptize
37+
38+
test:
39+
$(REBAR) eunit
40+
$(RETEST) inttest

rebar.config.script

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
2+
%% ex: ts=4 sw=4 ft=erlang et
3+
4+
%% TODO: Change temporary retest fork back to dizzyd/retest after merge
5+
%% ExtraDeps = [{retest, ".*", {git, "git://github.com/dizzyd/retest.git"}}],
6+
ExtraDeps = [{retest, ".*",
7+
{git, "git://github.com/tuncer/retest.git", "next"}}],
8+
9+
case os:getenv("REBAR_EXTRA_DEPS") of
10+
false ->
11+
CONFIG;
12+
_ ->
13+
case lists:keysearch(deps, 1, CONFIG) of
14+
{value, {deps, Deps}} ->
15+
NDeps = Deps ++ ExtraDeps,
16+
lists:keyreplace(deps, 1, CONFIG, {deps, NDeps});
17+
false ->
18+
CONFIG ++ [{deps, ExtraDeps}]
19+
end
20+
end.

0 commit comments

Comments
 (0)