Permalink
Browse files

build_command and rebar_compatible are no longer exclusive, build_com…

…mand will be executed after rebar get-deps compile
  • Loading branch information...
1 parent 345e3a7 commit c16fa32f6cacc0695296b137475685592a8e7b01 @yrashk yrashk committed Feb 1, 2011
Showing with 13 additions and 11 deletions.
  1. +2 −1 CONTRIBUTING.md
  2. +11 −10 src/agner_main.erl
View
@@ -34,9 +34,10 @@ some validity checks.
If your target repository can't be built by simply invoking `rebar get-deps && rebar compile` then you need to supply
a `build_command` property, for example:
-
{build_command, "make"}.
+Alternatively, you can also use it to finalize build process after rebar get-deps & compile for rebar compatible projects.
+
The build command will be invoked in checked out directory containing target repository.
### Install command
View
@@ -352,16 +352,17 @@ handle_command(fetch, Opts) ->
rebar:main(["compile"]),
file:set_cwd(Cwd);
_ ->
- case proplists:get_value(build_command, Spec) of
- undefined ->
- io:format("ERROR: No build_command specified, can't build this package");
- Command ->
- io:format("Building (output will be shown when done)...~n"),
- {ok, Cwd} = file:get_cwd(),
- file:set_cwd(Directory),
- io:format("~s~n",[os:cmd(Command)]),
- file:set_cwd(Cwd)
- end
+ ignore
+ end,
+ case proplists:get_value(build_command, Spec) of
+ undefined ->
+ io:format("ERROR: No build_command specified, can't build this package");
+ Command ->
+ io:format("Building (output will be shown when done)...~n"),
+ {ok, Cwd0} = file:get_cwd(),
+ file:set_cwd(Directory),
+ io:format("~s~n",[os:cmd(Command)]),
+ file:set_cwd(Cwd0)
end,
case proplists:get_value(addpath, Opts) of
true ->

0 comments on commit c16fa32

Please sign in to comment.