ソースを参照

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年前
コミット
82faab2fe7
1個のファイルの変更1行の追加1行の削除
  1. +1
    -1
      src/rebar_git_resource.erl

+ 1
- 1
src/rebar_git_resource.erl ファイルの表示

@ -194,7 +194,7 @@ parse_tags(Dir) ->
{error, _} ->
{undefined, "0.0.0"};
{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]} ->
{Tag, Vsn};
nomatch ->

読み込み中…
キャンセル
保存