summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rebar_git_resource.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rebar_git_resource.erl b/src/rebar_git_resource.erl
index 0efdd1b..6405e46 100644
--- a/src/rebar_git_resource.erl
+++ b/src/rebar_git_resource.erl
@@ -198,6 +198,12 @@ parse_tags(Dir) ->
{match,[Tag, Vsn]} ->
{Tag, Vsn};
nomatch ->
- {undefined, "0.0.0"}
+ case rebar_utils:sh("git describe --tags",
+ [{use_stdout, false}, return_on_error, {cd, Dir}]) of
+ {error, _} ->
+ {undefined, "0.0.0"};
+ {ok, LatestVsn} ->
+ {undefined, string:strip(LatestVsn, both, $\n)}
+ end
end
end.