diff options
author | Tristan Sloughter <t@crashfast.com> | 2018-10-14 10:50:16 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-14 10:50:16 -0600 |
commit | 86519cf743204eab1d922ca8133fbf00c66f9ee8 (patch) | |
tree | c2b5574348f2b83f64a86741b59ace1421b8c0f8 /src/rebar_state.erl | |
parent | a80d1988963698717548ba269d7e5f915fca4e27 (diff) |
fix resolving versions from vcs (#1915)
app_info was turning any vsn into a binary which the vcs_vsn
function interprets as being an actual version and not something
like <<"git">>. original_vsn shouldn't be converted as it is then
not longer "original".
Diffstat (limited to 'src/rebar_state.erl')
-rw-r--r-- | src/rebar_state.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rebar_state.erl b/src/rebar_state.erl index c8a9400..31d3a08 100644 --- a/src/rebar_state.erl +++ b/src/rebar_state.erl @@ -43,7 +43,7 @@ project_builders/1, add_project_builder/3, - create_resources/2, + create_resources/2, set_resources/2, resources/1, resources/2, add_resource/2, providers/1, providers/2, add_provider/2, allow_provider_overrides/1, allow_provider_overrides/2 @@ -368,6 +368,10 @@ namespace(State=#state_t{}, Namespace) -> resources(#state_t{resources=Resources}) -> Resources. +-spec set_resources(t(), [{rebar_resource_v2:type(), module()}]) -> t(). +set_resources(State, Resources) -> + State#state_t{resources=Resources}. + -spec resources(t(), [{rebar_resource_v2:type(), module()}]) -> t(). resources(State, NewResources) -> lists:foldl(fun(Resource, StateAcc) -> |