mirror of
https://github.com/correl/rebar.git
synced 2024-11-15 03:00:18 +00:00
fix hg and git clone commands for when repo does not exactly match application name
This commit is contained in:
parent
124897e937
commit
fc58d12820
1 changed files with 2 additions and 2 deletions
|
@ -254,11 +254,11 @@ use_source(AppDir, App, VsnRegex, Source, Count) ->
|
||||||
|
|
||||||
download_source(AppDir, {hg, Url, Rev}) ->
|
download_source(AppDir, {hg, Url, Rev}) ->
|
||||||
ok = filelib:ensure_dir(AppDir),
|
ok = filelib:ensure_dir(AppDir),
|
||||||
rebar_utils:sh(?FMT("hg clone -U ~s", [Url]), [], filename:dirname(AppDir)),
|
rebar_utils:sh(?FMT("hg clone -U ~s ~s", [Url, filename:basename(AppDir)]), [], filename:dirname(AppDir)),
|
||||||
rebar_utils:sh(?FMT("hg update ~s", [Rev]), [], AppDir);
|
rebar_utils:sh(?FMT("hg update ~s", [Rev]), [], AppDir);
|
||||||
download_source(AppDir, {git, Url, Rev}) ->
|
download_source(AppDir, {git, Url, Rev}) ->
|
||||||
ok = filelib:ensure_dir(AppDir),
|
ok = filelib:ensure_dir(AppDir),
|
||||||
rebar_utils:sh(?FMT("git clone -n ~s", [Url]), [], filename:dirname(AppDir)),
|
rebar_utils:sh(?FMT("git clone -n ~s ~s", [Url, filename:basename(AppDir)]), [], filename:dirname(AppDir)),
|
||||||
rebar_utils:sh(?FMT("git checkout ~s", [Rev]), [], AppDir);
|
rebar_utils:sh(?FMT("git checkout ~s", [Rev]), [], AppDir);
|
||||||
download_source(AppDir, {bzr, Url, Rev}) ->
|
download_source(AppDir, {bzr, Url, Rev}) ->
|
||||||
ok = filelib:ensure_dir(AppDir),
|
ok = filelib:ensure_dir(AppDir),
|
||||||
|
|
Loading…
Reference in a new issue