cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmo...@apache.org
Subject git commit: Support another format for remote apache repo
Date Fri, 27 Sep 2013 15:43:18 GMT
Updated Branches:
  refs/heads/master 9a210c3da -> 3bef4d510


Support another format for remote apache repo


Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/3bef4d51
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/3bef4d51
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/3bef4d51

Branch: refs/heads/master
Commit: 3bef4d51033ca9eb908838cd345f4e2c437ad374
Parents: 9a210c3
Author: Michal Mocny <mmocny@gmail.com>
Authored: Fri Sep 27 11:39:31 2013 -0400
Committer: Michal Mocny <mmocny@gmail.com>
Committed: Fri Sep 27 11:39:31 2013 -0400

----------------------------------------------------------------------
 coho | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/3bef4d51/coho
----------------------------------------------------------------------
diff --git a/coho b/coho
index 6732961..50fa1af 100755
--- a/coho
+++ b/coho
@@ -1008,11 +1008,16 @@ function repoUpdateCommand(argv) {
 
 function determineApacheRemote(repo) {
     var fields = execHelper('git remote -v', true).split(/\s+/);
+    var ret = null;
     for (var i = 1; i < fields.length; i += 3) {
-        if (fields[i].indexOf('git-wip-us.apache.org/repos/asf/' + repo.repoName) != -1)
{
-            return fields[i - 1];
-        }
+        ['git-wip-us.apache.org/repos/asf/', 'git.apache.org/'].forEach(function(validRepo)
{
+            if (fields[i].indexOf(validRepo + repo.repoName) != -1) {
+                ret = fields[i - 1];
+            }
+        });
     }
+    if (ret)
+        return ret;
     fatal('Could not find an apache remote for repo ' + repo.repoName);
 }
 


Mime
View raw message