mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 03:00:17 +00:00
Added support for checking out tags from git
This commit is contained in:
parent
83cece0f80
commit
ed8ecf751f
1 changed files with 8 additions and 2 deletions
|
@ -269,10 +269,16 @@ download_source(AppDir, {hg, Url, Rev}) ->
|
|||
ok = filelib:ensure_dir(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);
|
||||
download_source(AppDir, {git, Url, Rev}) ->
|
||||
download_source(AppDir, {git, Url, {branch, Branch}}) ->
|
||||
ok = filelib:ensure_dir(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", [Branch]), [], AppDir);
|
||||
download_source(AppDir, {git, Url, {tag, Tag}}) ->
|
||||
ok = filelib:ensure_dir(AppDir),
|
||||
rebar_utils:sh(?FMT("git clone -n ~s ~s", [Url, filename:basename(AppDir)]), [], filename:dirname(AppDir)),
|
||||
rebar_utils:sh(?FMT("git checkout -b ~s", [Tag]), [], AppDir);
|
||||
download_source(AppDir, {git, Url, Rev}) ->
|
||||
download_source(AppDir, {git, Url, {branch, Rev}});
|
||||
download_source(AppDir, {bzr, Url, Rev}) ->
|
||||
ok = filelib:ensure_dir(AppDir),
|
||||
rebar_utils:sh(?FMT("bzr branch -r ~s ~s ~s",
|
||||
|
|
Loading…
Reference in a new issue