summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-07-06 23:38:50 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-07-06 23:38:50 -0500
commit7a65d4ec75ce9e16741a340dfcca75894ec44c6b (patch)
tree5e630cbb14d92c3ef0a5a6766acebbc37afd3f99
parent5fe10193c44f4579b3c1adf62d43251383b73f73 (diff)
parent6430039bb6d2ec4d366dafb9cc57520d0f838440 (diff)
Merge pull request #593 from tsloughter/upgrade_http
handle http:// git deps in check fif upgrade needed
-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")}.