mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
Treat HEAD as a branch to fix regressions caused by 3ef7db5
This commit is contained in:
parent
147d5e3b56
commit
a54dd53673
1 changed files with 4 additions and 4 deletions
|
@ -352,9 +352,9 @@ download_source(AppDir, {hg, Url, Rev}) ->
|
||||||
[{cd, filename:dirname(AppDir)}]),
|
[{cd, filename:dirname(AppDir)}]),
|
||||||
rebar_utils:sh(?FMT("hg update ~s", [Rev]), [{cd, AppDir}]);
|
rebar_utils:sh(?FMT("hg update ~s", [Rev]), [{cd, AppDir}]);
|
||||||
download_source(AppDir, {git, Url}) ->
|
download_source(AppDir, {git, Url}) ->
|
||||||
download_source(AppDir, {git, Url, "HEAD"});
|
download_source(AppDir, {git, Url, {branch, "HEAD"}});
|
||||||
download_source(AppDir, {git, Url, ""}) ->
|
download_source(AppDir, {git, Url, ""}) ->
|
||||||
download_source(AppDir, {git, Url, "HEAD"});
|
download_source(AppDir, {git, Url, {branch, "HEAD"}});
|
||||||
download_source(AppDir, {git, Url, {branch, Branch}}) ->
|
download_source(AppDir, {git, Url, {branch, Branch}}) ->
|
||||||
ok = filelib:ensure_dir(AppDir),
|
ok = filelib:ensure_dir(AppDir),
|
||||||
rebar_utils:sh(?FMT("git clone -n ~s ~s", [Url, filename:basename(AppDir)]),
|
rebar_utils:sh(?FMT("git clone -n ~s ~s", [Url, filename:basename(AppDir)]),
|
||||||
|
@ -400,9 +400,9 @@ update_source(Dep) ->
|
||||||
end.
|
end.
|
||||||
|
|
||||||
update_source(AppDir, {git, Url}) ->
|
update_source(AppDir, {git, Url}) ->
|
||||||
update_source(AppDir, {git, Url, "HEAD"});
|
update_source(AppDir, {git, Url, {branch, "HEAD"}});
|
||||||
update_source(AppDir, {git, Url, ""}) ->
|
update_source(AppDir, {git, Url, ""}) ->
|
||||||
update_source(AppDir, {git, Url, "HEAD"});
|
update_source(AppDir, {git, Url, {branch, "HEAD"}});
|
||||||
update_source(AppDir, {git, _Url, {branch, Branch}}) ->
|
update_source(AppDir, {git, _Url, {branch, Branch}}) ->
|
||||||
ShOpts = [{cd, AppDir}],
|
ShOpts = [{cd, AppDir}],
|
||||||
rebar_utils:sh("git fetch origin", ShOpts),
|
rebar_utils:sh("git fetch origin", ShOpts),
|
||||||
|
|
Loading…
Reference in a new issue