diff --git a/src/rebar_git_resource.erl b/src/rebar_git_resource.erl index 4a37a02b..807ed825 100644 --- a/src/rebar_git_resource.erl +++ b/src/rebar_git_resource.erl @@ -335,7 +335,8 @@ parse_tags(Dir) -> {ok, Line} -> case re:run(Line, "(\\(|\\s)(HEAD[^,]*,\\s)tag:\\s(v?([^,\\)]+))", [{capture, [3, 4], list}, unicode]) of {match,[Tag, Vsn]} -> - {Tag, Vsn}; + %% git tag can be repo_name/proj/0532349838, only want the hash + {Tag, lists:last(rebar_string:lexemes(Vsn, "/"))}; nomatch -> case rebar_utils:sh("git describe --tags --abbrev=0", [{use_stdout, false}, return_on_error, {cd, Dir}]) of