summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-07-06 23:22:15 -0500
committerTristan Sloughter <t@crashfast.com>2015-07-06 23:22:15 -0500
commit6430039bb6d2ec4d366dafb9cc57520d0f838440 (patch)
tree5e630cbb14d92c3ef0a5a6766acebbc37afd3f99 /src
parentb6b32fc64efb3b8a48f144fa850bfef923f66d45 (diff)
handle http:// git deps in check fif upgrade needed
Diffstat (limited to 'src')
-rw-r--r--src/rebar_git_resource.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rebar_git_resource.erl b/src/rebar_git_resource.erl
index dfec86a..1fa7750 100644
--- a/src/rebar_git_resource.erl
+++ b/src/rebar_git_resource.erl
@@ -68,6 +68,7 @@ compare_url(Dir, Url) ->
CurrentUrl1 = string:strip(string:strip(CurrentUrl, both, $\n), both, $\r),
ParsedUrl = parse_git_url(Url),
ParsedCurrentUrl = parse_git_url(CurrentUrl1),
+ ?DEBUG("Comparing git url ~p with ~p", [ParsedUrl, ParsedCurrentUrl]),
ParsedCurrentUrl =:= ParsedUrl.
parse_git_url("git@" ++ HostPath) ->
@@ -76,6 +77,9 @@ parse_git_url("git@" ++ HostPath) ->
parse_git_url("git://" ++ HostPath) ->
[Host | Path] = string:tokens(HostPath, "/"),
{Host, filename:rootname(filename:join(Path), ".git")};
+parse_git_url("http://" ++ HostPath) ->
+ [Host | Path] = string:tokens(HostPath, "/"),
+ {Host, filename:rootname(filename:join(Path), ".git")};
parse_git_url("https://" ++ HostPath) ->
[Host | Path] = string:tokens(HostPath, "/"),
{Host, filename:rootname(filename:join(Path), ".git")}.