diff options
author | Anders <andersk84@gmail.com> | 2010-10-25 13:48:57 +0100 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2010-11-09 20:19:38 -0700 |
commit | 513ae33c5c5f67a72d6149ecef6968b634cad846 (patch) | |
tree | d81a2a026ed7c97bde0568cf70cce1c7b40a1706 /src/rebar_core.erl | |
parent | c604d85ed56363ee1a0de1f28dd1db40d27ff406 (diff) |
Add possibility to specify rebar config for the "main" application
Diffstat (limited to 'src/rebar_core.erl')
-rw-r--r-- | src/rebar_core.erl | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl index e92f158..3c64f8d 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -133,6 +133,12 @@ parse_args(Args) -> rebar_config:set_global(jobs, Jobs) end, + %% Set the rebar config to use + case proplists:get_value(config, Options) of + undefined -> ok; + Conf -> rebar_config:set_global(config, Conf) + end, + %% Filter all the flags (i.e. strings of form key=value) from the %% command line arguments. What's left will be the commands to run. filter_flags(NonOptArgs, []); @@ -250,12 +256,13 @@ option_spec_list() -> [Jobs]), [ %% {Name, ShortOpt, LongOpt, ArgSpec, HelpMsg} - {help, $h, "help", undefined, "Show the program options"}, - {commands, $c, "commands", undefined, "Show available commands"}, - {verbose, $v, "verbose", undefined, "Be verbose about what gets done"}, - {version, $V, "version", undefined, "Show version information"}, - {force, $f, "force", undefined, "Force"}, - {jobs, $j, "jobs", integer, JobsHelp} + {help, $h, "help", undefined, "Show the program options"}, + {commands, $c, "commands", undefined, "Show available commands"}, + {verbose, $v, "verbose", undefined, "Be verbose about what gets done"}, + {version, $V, "version", undefined, "Show version information"}, + {force, $f, "force", undefined, "Force"}, + {jobs, $j, "jobs", integer, JobsHelp}, + {config, $C, "config", string, "Rebar config file to use"} ]. %% |