瀏覽代碼

Merge pull request #2245 from max-au/max-au/rebar_git_provider_hash_fix

rebar_git_resource: fix {vsn, git} parser
pull/2249/head
Fred Hebert 5 年之前
committed by GitHub
父節點
當前提交
81c0ec0562
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      src/rebar_git_resource.erl

+ 2
- 1
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/05323498<hash>38, 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

Loading…
取消
儲存