summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2017-11-02 15:45:49 -0400
committerGitHub <noreply@github.com>2017-11-02 15:45:49 -0400
commit557623ba897d580702034bd76f799b5107d72c6b (patch)
tree2b0af731cc57013e8cd0a721d9c0a732366165e1
parenta1b1df4ac9ec1e51fac6a81dc80fa87a39316912 (diff)
parentb383dcc1a965a568c8301d3afd73d28a4089823a (diff)
Merge pull request #1654 from tsloughter/strip-v
git vsn from tag both strip 'v' prefix
-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