diff options
author | Matwey V. Kornilov <matwey.kornilov@gmail.com> | 2016-03-02 16:30:30 +0300 |
---|---|---|
committer | Matwey V. Kornilov <matwey.kornilov@gmail.com> | 2016-03-18 11:05:18 +0300 |
commit | 16bc8f77254d58913748e3d878b48be290a5fa89 (patch) | |
tree | 774fe5904ceca628b7cbe876bd767864299ec766 /src/rebar.erl | |
parent | 384af7ef191b8b3f52b212f6b7f02ace786ba2a9 (diff) | |
download | rebar-16bc8f77254d58913748e3d878b48be290a5fa89.tar.gz |
Introduce REBAR_VSN_CACHE_FILE env variable to load/save vsn cache
When REBAR_VSN_CACHE_FILE is set, then vsn cache is loaded from
this file on rebar start and updated when new data.
Under specific circumstances (i.e. in build environments),
full git tree may not be available, but only its snapshot.
We need a way to use preheat vsn cache instead of invocing
git command.
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Diffstat (limited to 'src/rebar.erl')
-rw-r--r-- | src/rebar.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rebar.erl b/src/rebar.erl index 888f80d..5a809d2 100644 --- a/src/rebar.erl +++ b/src/rebar.erl @@ -143,7 +143,7 @@ init_config({Options, _NonOptArgs}) -> %% Keep track of how many operations we do, so we can detect bad commands BaseConfig1 = rebar_config:set_xconf(BaseConfig, operations, 0), %% Initialize vsn cache - rebar_config:set_xconf(BaseConfig1, vsn_cache, dict:new()). + rebar_utils:init_vsn_cache(BaseConfig1). init_config1(BaseConfig) -> %% Determine the location of the rebar executable; important for pulling @@ -288,6 +288,7 @@ help() -> ?CONSOLE( "Environment variables:~n" " REBAR_DEPS_PREFER_LIBS to look for dependecies in system libs prior fetching.~n" + " REBAR_VSN_CACHE_FILE to load vsn cache from and save to specified file.~n" "~n", []). %% |