Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No need for special case when in rel dir. #112

Merged
merged 1 commit into from May 17, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 8 additions & 18 deletions src/boss/boss_load.erl
Expand Up @@ -356,24 +356,14 @@ incoming_mail_controller_module(Application) ->
list_to_atom(lists:concat([Application, "_incoming_mail_controller"])). list_to_atom(lists:concat([Application, "_incoming_mail_controller"])).


vcs_vsn_cmd(git) -> vcs_vsn_cmd(git) ->
case rebar_rel_utils:is_rel_dir() of case os:type() of
false -> {win32,nt} ->
%% git describe the last commit that touched CWD to make "FOR /F \"usebackq tokens=* delims=\" %i in "
%% sure we use local (CWD) history. "(`git log -n 1 \"--pretty=format:%h\" .`) do "
%% Required for correct versioning of apps in subdirs, "@git describe --always --tags %i";
%% such as apps/app1. _ ->
case os:type() of "git describe --always --tags "
{win32,nt} -> "`git log -n 1 --pretty=format:%h .`"
"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;
{true, _} ->
%% Use global history (not CWD) git describe if in a rel_dir
"git describe --always --tags"
end; 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";
Expand Down