You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/06/19 02:22:35 UTC

[1/3] git commit: Add --push option, fix (via coho) broke

Updated Branches:
  refs/heads/master daf91387d -> 6b27f3f8d


Add --push option, fix (via coho) broke


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

Branch: refs/heads/master
Commit: 28282e95472f7cb13c21e8b545d61ee61596adf8
Parents: daf9138
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Jun 18 20:05:43 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Jun 18 20:05:43 2013 -0400

----------------------------------------------------------------------
 coho | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/28282e95/coho
----------------------------------------------------------------------
diff --git a/coho b/coho
index 6f3527f..dcbfcb2 100755
--- a/coho
+++ b/coho
@@ -617,6 +617,9 @@ function configureReleaseCommandFlags(opt) {
         .options('version', {
             desc: 'The version to use for the branch. Must match the pattern #.#.#[rc#]',
             demand: true
+         })
+        .options('push', {
+            desc: 'Whether to git push changes. Defaults to false.',
          });
     opt = registerHelpFlag(opt);
     argv = opt.argv;
@@ -645,6 +648,7 @@ function createReleaseBranchCommand() {
     );
     var repos = computeReposFromFlag(argv);
     var version = argv.version;
+    var performGitPush = argv.push;
     var branchName = version.replace(/\d+(rc\d)?$/, 'x');
 
     // First - perform precondition checks.
@@ -685,8 +689,10 @@ function createReleaseBranchCommand() {
                         cpAndLog(src, jsPath);
                     });
                     if (pendingChangesExist()) {
-                        execHelper('git commit -am "Update JS snapshot to version ' + version + '" (via coho)');
-                        execHelper('git push ' + repo.remoteName + ' master');
+                        execHelper('git commit -am "Update JS snapshot to version ' + version + ' (via coho)"');
+                        if (performGitPush) {
+                          execHelper('git push ' + repo.remoteName + ' master');
+                        }
                     }
                 } else if (allRepos.indexOf(repo) != -1) {
                     console.log('*** DO NOT KNOW HOW TO UPDATE cordova.js FOR THIS REPO ***');
@@ -700,7 +706,9 @@ function createReleaseBranchCommand() {
                 updateRepos([repo], [branchName], true);
             } else {
                 execHelper('git checkout -b ' + branchName);
-                execHelper('git push --set-upstream ' + repo.remoteName + ' ' + branchName);
+                if (performGitPush) {
+                  execHelper('git push --set-upstream ' + repo.remoteName + ' ' + branchName);
+                }
             }
             // Update the VERSION files.
             var versionFilePath = 'VERSION';
@@ -727,8 +735,10 @@ function createReleaseBranchCommand() {
             }
 
             if (pendingChangesExist()) {
-                execHelper('git commit -am "Set VERSION to ' + version + '" (via coho)');
-                execHelper('git push ' + repo.remoteName + ' ' + branchName);
+                execHelper('git commit -am "Set VERSION to ' + version + ' (via coho)"');
+                if (performGitPush) {
+                  execHelper('git push ' + repo.remoteName + ' ' + branchName);
+                }
             }
         });
     });
@@ -742,6 +752,7 @@ function tagReleaseBranchCommand(argv) {
     );
     var repos = computeReposFromFlag(argv);
     var version = argv.version;
+    var performGitPush = argv.push;
     var branchName = version.replace(/\d+(rc\d)?$/, 'x');
 
     // First - perform precondition checks.
@@ -771,7 +782,9 @@ function tagReleaseBranchCommand(argv) {
                 } else {
                     execHelper('git tag ' + version);
                 }
-                execHelper('git push --tags ' + repo.remoteName + ' ' + branchName);
+                if (performGitPush) {
+                  execHelper('git push --tags ' + repo.remoteName + ' ' + branchName);
+                }
             } else {
                 console.log('Repo ' + repo.repoName + ' is already tagged.');
             }


[3/3] git commit: Add a message about needing to run again with --push

Posted by ag...@apache.org.
Add a message about needing to run again with --push


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

Branch: refs/heads/master
Commit: 6b27f3f8dac36655f0a05a5f7ea50e284e407793
Parents: 710b8dd
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Jun 18 20:22:29 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Jun 18 20:22:29 2013 -0400

----------------------------------------------------------------------
 coho | 34 ++++++++++++++++++++++++++++------
 1 file changed, 28 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/6b27f3f8/coho
----------------------------------------------------------------------
diff --git a/coho b/coho
index c96747d..36f6688 100755
--- a/coho
+++ b/coho
@@ -651,6 +651,7 @@ function createReleaseBranchCommand() {
     var repos = computeReposFromFlag(argv);
     var version = argv.version;
     var performGitPush = argv.push;
+    var needsGitPush = false;
     var branchName = version.replace(/\d+(rc\d)?$/, 'x');
 
     // First - perform precondition checks.
@@ -674,8 +675,8 @@ function createReleaseBranchCommand() {
     // Ensure cordova-js comes first.
     var repoIndex = repos.indexOf(cordovaJsRepo);
     if (repoIndex != -1) {
-      repos.splice(repoIndex, 1);
-      repos.unshift(cordovaJsRepo);
+        repos.splice(repoIndex, 1);
+        repos.unshift(cordovaJsRepo);
     }
 
     forEachRepo(repos, function(repo) {
@@ -693,7 +694,9 @@ function createReleaseBranchCommand() {
                     if (pendingChangesExist()) {
                         execHelper('git commit -am "Update JS snapshot to version ' + version + ' (via coho)"');
                         if (performGitPush) {
-                          execHelper('git push ' + repo.remoteName + ' master');
+                            execHelper('git push ' + repo.remoteName + ' master');
+                        } else {
+                            needsGitPush = true;
                         }
                     }
                 } else if (allRepos.indexOf(repo) != -1) {
@@ -709,7 +712,9 @@ function createReleaseBranchCommand() {
             } else {
                 execHelper('git checkout -b ' + branchName);
                 if (performGitPush) {
-                  execHelper('git push --set-upstream ' + repo.remoteName + ' ' + branchName);
+                    execHelper('git push --set-upstream ' + repo.remoteName + ' ' + branchName);
+                } else {
+                    needsGitPush = true;
                 }
             }
             // Update the VERSION files.
@@ -739,11 +744,19 @@ function createReleaseBranchCommand() {
             if (pendingChangesExist()) {
                 execHelper('git commit -am "Set VERSION to ' + version + ' (via coho)"');
                 if (performGitPush) {
-                  execHelper('git push ' + repo.remoteName + ' ' + branchName);
+                    execHelper('git push ' + repo.remoteName + ' ' + branchName);
+                } else {
+                    needsGitPush = true;
                 }
             }
         });
     });
+
+    console.log('');
+    console.log('All work is complete.');
+    if (needsGitPush) {
+        console.log('Run again with --push to push changes.');
+    }
 }
 
 function tagReleaseBranchCommand(argv) {
@@ -755,6 +768,7 @@ function tagReleaseBranchCommand(argv) {
     var repos = computeReposFromFlag(argv);
     var version = argv.version;
     var performGitPush = argv.push;
+    var needsGitPush = false;
     var branchName = version.replace(/\d+(rc\d)?$/, 'x');
 
     // First - perform precondition checks.
@@ -785,13 +799,21 @@ function tagReleaseBranchCommand(argv) {
                     execHelper('git tag ' + version);
                 }
                 if (performGitPush) {
-                  execHelper('git push --tags ' + repo.remoteName + ' ' + branchName);
+                    execHelper('git push --tags ' + repo.remoteName + ' ' + branchName);
+                } else {
+                    needsGitPush = true;
                 }
             } else {
                 console.log('Repo ' + repo.repoName + ' is already tagged.');
             }
         });
     });
+
+    console.log('');
+    console.log('All work is complete.');
+    if (needsGitPush) {
+        console.log('Run again with --push to push changes.');
+    }
 }
 
 function ratCommand() {


[2/3] git commit: Fix JS path for wp8 and add JS path for windows.

Posted by ag...@apache.org.
Fix JS path for wp8 and add JS path for windows.


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

Branch: refs/heads/master
Commit: 710b8dd210239c372fb6e8c64874aaaf20752a1f
Parents: 28282e9
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Jun 18 20:15:03 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Jun 18 20:15:03 2013 -0400

----------------------------------------------------------------------
 coho | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/710b8dd2/coho
----------------------------------------------------------------------
diff --git a/coho b/coho
index dcbfcb2..c96747d 100755
--- a/coho
+++ b/coho
@@ -62,7 +62,9 @@ var platformRepos = [
     }, {
         title: 'Windows',
         id: 'windows',
-        repoName: 'cordova-windows'
+        repoName: 'cordova-windows',
+        cordovaJsSrcName: 'cordova.windows8.js',
+        cordovaJsPaths: ['windows8/cordova.js', 'windows8/template/www/cordova.js']
     }, {
         title: 'Windows Phone 7',
         id: 'wp7',
@@ -74,7 +76,7 @@ var platformRepos = [
         id: 'wp8',
         repoName: 'cordova-wp8',
         cordovaJsSrcName: 'cordova.windowsphone.js',
-        cordovaJsPaths: ['templates/standalone/www/cordova.js']
+        cordovaJsPaths: ['common/www/cordova.js']
     }, {
         title: 'Mac OSX',
         id: 'osx',