mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
rebar_app_utils: fix git hook for Windows
This commit is contained in:
parent
b535b5eea8
commit
85575fca65
1 changed files with 8 additions and 1 deletions
|
@ -171,7 +171,14 @@ vcs_vsn_cmd(git) ->
|
||||||
%% Explicitly git-describe a committish to accommodate for projects
|
%% Explicitly git-describe a committish to accommodate for projects
|
||||||
%% in subdirs which don't have a GIT_DIR. In that case we will
|
%% in subdirs which don't have a GIT_DIR. In that case we will
|
||||||
%% get a description of the last commit that touched the subdir.
|
%% get a description of the last commit that touched the subdir.
|
||||||
"git describe --always --tags `git log -n 1 --pretty=format:%h .`";
|
case os:type() of
|
||||||
|
{win32,nt} ->
|
||||||
|
"FOR /F \"usebackq tokens=* delims=\" %i in "
|
||||||
|
"(`git log -n 1 \"--pretty=format:%h\" .`) do "
|
||||||
|
"@git describe --always --tags %i";
|
||||||
|
_ ->
|
||||||
|
"git describe --always --tags `git log -n 1 --pretty=format:%h .`"
|
||||||
|
end;
|
||||||
vcs_vsn_cmd(hg) -> "hg identify -i";
|
vcs_vsn_cmd(hg) -> "hg identify -i";
|
||||||
vcs_vsn_cmd(bzr) -> "bzr revno";
|
vcs_vsn_cmd(bzr) -> "bzr revno";
|
||||||
vcs_vsn_cmd(svn) -> "svnversion";
|
vcs_vsn_cmd(svn) -> "svnversion";
|
||||||
|
|
Loading…
Reference in a new issue