Przeglądaj źródła

Only match current HEAD tag in git semver

In the scenario that someone had cloned an entire
repository and then checked out an older version
tag, the semantic versioning would detect the
newest tag, not the checked out tag. Look for
the HEAD string prior to tag: to indicate the
currently selected tag.
pull/811/head
Zachary Hueras 9 lat temu
rodzic
commit
82faab2fe7
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      src/rebar_git_resource.erl

+ 1
- 1
src/rebar_git_resource.erl Wyświetl plik

@ -194,7 +194,7 @@ parse_tags(Dir) ->
{error, _} -> {error, _} ->
{undefined, "0.0.0"}; {undefined, "0.0.0"};
{ok, Line} -> {ok, Line} ->
case re:run(Line, "(\\(|\\s)tag:\\s(v?([^,\\)]+))", [{capture, [2, 3], list}]) of
case re:run(Line, "(\\(|\\s)(HEAD,\\s)tag:\\s(v?([^,\\)]+))", [{capture, [3, 4], list}]) of
{match,[Tag, Vsn]} -> {match,[Tag, Vsn]} ->
{Tag, Vsn}; {Tag, Vsn};
nomatch -> nomatch ->

Ładowanie…
Anuluj
Zapisz