From 11b26e51f3718e76d91dfdab76ace435d54b47ee Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Fri, 5 Apr 2013 12:15:13 -0500 Subject: update travis config --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3832235..b105084 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: erlang otp_release: + - R16B + - R15B03 - R15B02 - R15B01 - R15B @@ -10,4 +12,7 @@ script: "make rebuild" branches: only: - master - - next \ No newline at end of file +notifications: + email: + - core@erlware.org + irc: "irc.freenode.org#erlware" \ No newline at end of file -- cgit v1.2.3 From dcb5c75da8d2d8ba6e03b12d9432fce4d4ef3068 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Fri, 5 Apr 2013 12:18:35 -0500 Subject: update README with travis status --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 419bc50..3d11de2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/tsloughter/relcool.png)](https://travis-ci.org/tsloughter/relcool) + # NAME relcool - A release assembler for erlang -- cgit v1.2.3 From 1a919d620699602cc0235aea9d3831ffb2540cf3 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Fri, 5 Apr 2013 12:23:50 -0500 Subject: update Makefile to remove deps dir on distclean --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5bbe08f..3be2ee3 100644 --- a/Makefile +++ b/Makefile @@ -112,6 +112,6 @@ clean: clean-common-test-data distclean: clean - rm -rf $(DEPS_PLT) - - rm -rvf $(CURDIR)/deps/* + - rm -rvf $(CURDIR)/deps rebuild: distclean deps compile escript dialyzer test -- cgit v1.2.3 From 8b0e8e9f3e836821fb6b7d0bf2817a5fb7ce821d Mon Sep 17 00:00:00 2001 From: Eric B Merritt Date: Fri, 5 Apr 2013 12:35:10 -0700 Subject: remove debug print statement that some how made it in --- src/rcl_dscv_util.erl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/rcl_dscv_util.erl b/src/rcl_dscv_util.erl index 4fb6126..ba66500 100644 --- a/src/rcl_dscv_util.erl +++ b/src/rcl_dscv_util.erl @@ -93,7 +93,6 @@ discover_dir(ProcessDir, File, directory) -> end; discover_dir(ProcessDir, File, file) -> Res = ProcessDir(File, file), - io:format("Result -> ~p~n", [Res]), case ProcessDir(File, file) of {ok, Result} -> [{ok, Result}]; -- cgit v1.2.3 From a55808420959bae0d9097ab97bc96e1fc4b4d19b Mon Sep 17 00:00:00 2001 From: Eric B Merritt Date: Fri, 5 Apr 2013 14:02:59 -0700 Subject: fix unexpected variable issue in build --- src/rcl_dscv_util.erl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/rcl_dscv_util.erl b/src/rcl_dscv_util.erl index ba66500..68dcb68 100644 --- a/src/rcl_dscv_util.erl +++ b/src/rcl_dscv_util.erl @@ -92,7 +92,6 @@ discover_dir(ProcessDir, File, directory) -> [Err] end; discover_dir(ProcessDir, File, file) -> - Res = ProcessDir(File, file), case ProcessDir(File, file) of {ok, Result} -> [{ok, Result}]; -- cgit v1.2.3 From a96ae5dc597cbc01515c75fea9f41a6d79be91b3 Mon Sep 17 00:00:00 2001 From: Eric B Merritt Date: Fri, 5 Apr 2013 14:31:17 -0700 Subject: support both R14 'behaviours' and R15+ 'callback info' --- Makefile | 3 +-- rebar.config.script | 15 +++++++++++++++ src/rcl_provider.erl | 18 ++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 rebar.config.script diff --git a/Makefile b/Makefile index 3be2ee3..55565b0 100644 --- a/Makefile +++ b/Makefile @@ -81,8 +81,7 @@ $(DEPS_PLT): --apps erts kernel stdlib -r deps dialyzer: $(DEPS_PLT) - dialyzer --plt $(DEPS_PLT) --fullpath -Wrace_conditions \ - -I include -pa $(CURDIR)/ebin --src src + dialyzer --fullpath --plt $(DEPS_PLT) -I include -Wrace_conditions -r ./ebin typer: typer --plt $(DEPS_PLT) -r ./src diff --git a/rebar.config.script b/rebar.config.script new file mode 100644 index 0000000..c19a751 --- /dev/null +++ b/rebar.config.script @@ -0,0 +1,15 @@ +{match, [ErtsNumber]} = re:run(erlang:system_info(otp_release), "R(\\d+).+", [{capture, [1], list}]), +ErtsVsn = erlang:list_to_integer(ErtsNumber), +Opts1 = case lists:keysearch(erl_opts, 1, CONFIG) of + {value, {erl_opts, Opts0}} -> + Opts0; + false -> + [] + end, +Opts2 = if + ErtsVsn >= 15 -> + [{d, have_callback_support} | Opts1]; + true -> + Opts1 + end, +lists:keystore(erl_opts, 1, CONFIG, {erl_opts, Opts2}). diff --git a/src/rcl_provider.erl b/src/rcl_provider.erl index 750b96e..4d8f044 100644 --- a/src/rcl_provider.erl +++ b/src/rcl_provider.erl @@ -41,10 +41,28 @@ -opaque t() :: {?MODULE, module()}. + +-ifdef(have_callback_support). + -callback init(rcl_state:t()) -> {ok, rcl_state:t()} | relcool:error(). -callback do(rcl_state:t()) -> {ok, rcl_state:t()} | relcool:error(). -callback format_error(Reason::term()) -> iolist(). +-else. + +%% In the case where R14 or lower is being used to compile the system +%% we need to export a behaviour info +-export([behaviour_info/1]). +-spec behaviour_info(atom()) -> [{atom(), arity()}] | undefined. +behaviour_info(callbacks) -> + [{init, 1}, + {do, 1}, + {format_error, 1}]; +behaviour_info(_) -> + undefined. + +-endif. + %%%=================================================================== %%% API %%%=================================================================== -- cgit v1.2.3