summaryrefslogtreecommitdiff
path: root/src/rebar_git_resource.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2017-11-02 11:40:19 -0700
committerTristan Sloughter <t@crashfast.com>2017-11-02 12:07:40 -0700
commitb383dcc1a965a568c8301d3afd73d28a4089823a (patch)
tree2b0af731cc57013e8cd0a721d9c0a732366165e1 /src/rebar_git_resource.erl
parenta1b1df4ac9ec1e51fac6a81dc80fa87a39316912 (diff)
git vsn from tag both strip 'v' prefix
Diffstat (limited to 'src/rebar_git_resource.erl')
-rw-r--r--src/rebar_git_resource.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rebar_git_resource.erl b/src/rebar_git_resource.erl
index c63d10d..2855dd0 100644
--- a/src/rebar_git_resource.erl
+++ b/src/rebar_git_resource.erl
@@ -273,6 +273,9 @@ parse_tags(Dir) ->
[{use_stdout, false}, return_on_error, {cd, Dir}]) of
{error, _} ->
{undefined, "0.0.0"};
+ %% strip the v prefix if it exists like is done in the above match
+ {ok, [$v | LatestVsn]} ->
+ {undefined, string:strip(LatestVsn, both, $\n)};
{ok, LatestVsn} ->
{undefined, string:strip(LatestVsn, both, $\n)}
end