summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYakov <xazar.studio@gmail.com>2016-03-25 12:03:09 +0400
committerKozlov Yakov <yk@exante.eu>2016-04-04 18:03:55 +0300
commit581a01c405842b7508878a6ce36aa8a25bd0e88d (patch)
tree85f2f5d4090476ec24a96acb04f7aa578b729404 /src
parentc619921ed1370f6233127e3bfd928cf69badfc06 (diff)
Fixed git version bug
I've tried to compile project with git in .app.src vsn Project was tagged as 1.0.0, but resulting .app vsn becomes 1.0.0+build.6.reff0aec24 ```git lg * f0aec24 - (80 минут назад) Fixed ct — Kozlov Yakov (HEAD -> master, tag: 1.0.0, origin/master) ... 5 commits before ``` ``` $ git log --oneline --no-walk --tags --decorate f0aec24 (HEAD -> master, tag: 1.0.0, origin/master) Fixed ct ``` I've found that `HEAD -> master` doest match pattern in [rebar_git_resource](https://github.com/erlang/rebar3/blob/master/src/rebar_git_resource.erl#L204)
Diffstat (limited to 'src')
-rw-r--r--src/rebar_git_resource.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rebar_git_resource.erl b/src/rebar_git_resource.erl
index 876d047..5a6a5ef 100644
--- a/src/rebar_git_resource.erl
+++ b/src/rebar_git_resource.erl
@@ -201,7 +201,7 @@ parse_tags(Dir) ->
{error, _} ->
{undefined, "0.0.0"};
{ok, Line} ->
- case re:run(Line, "(\\(|\\s)(HEAD,\\s)tag:\\s(v?([^,\\)]+))", [{capture, [3, 4], list}]) of
+ case re:run(Line, "(\\(|\\s)(HEAD[^,]*,\\s)tag:\\s(v?([^,\\)]+))", [{capture, [3, 4], list}]) of
{match,[Tag, Vsn]} ->
{Tag, Vsn};
nomatch ->