You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ka...@apache.org on 2014/06/27 16:34:32 UTC

git commit: Add tweaks for releasing cordova-lib

Repository: cordova-coho
Updated Branches:
  refs/heads/master 2724f39fa -> 57e9cdd79


Add tweaks for releasing cordova-lib

 - Don't checkout master in the repos before "npm pack"-ing them.
 - Make coho "npm pack" cordova-lib like cli and plugman.
 - Update instructions (partially) to refer to cordova-lib


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

Branch: refs/heads/master
Commit: 57e9cdd79fff4aca1fe322e54bf8c6a002ec7da5
Parents: 2724f39
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Tue Jun 24 23:03:04 2014 -0400
Committer: Mark Koudritsky <ka...@gmail.com>
Committed: Fri Jun 27 10:32:17 2014 -0400

----------------------------------------------------------------------
 docs/tools-release-process.md | 21 ++++++++++++---------
 src/create-verify-archive.js  |  9 +++++----
 2 files changed, 17 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/57e9cdd7/docs/tools-release-process.md
----------------------------------------------------------------------
diff --git a/docs/tools-release-process.md b/docs/tools-release-process.md
index c0a36c3..d5ca556 100644
--- a/docs/tools-release-process.md
+++ b/docs/tools-release-process.md
@@ -115,10 +115,11 @@ Update each repo's RELEASENOTES.md file with changes
     # Then curate:
     vim cordova-cli/RELEASENOTES.md cordova-plugman/RELEASENOTES.md
 
-Update the version of plugman that CLI depends on:
+Update the version of cordova-lib that cli and plugman depend on:
 
-    v="$(grep '"version"' cordova-plugman/package.json | cut -d'"' -f4)"
-    sed -i '' -E 's/"plugman":.*/"plugman": "'$v'",/' cordova-cli/package.json
+    v="$(grep '"version"' cordova-lib/cordova-lib/package.json | cut -d'"' -f4)"
+    sed -i '' -E 's/"cordova-lib":.*/"cordova-lib"*: "'$v'",/' cordova-cli/package.json
+    sed -i '' -E 's/"cordova.lib":.*/"cordova-lib": "'$v'",/' cordova-plugman/package.json
 
 Update cordova-lib's npm-shrinkwrap.json:
 
@@ -131,9 +132,9 @@ Commit these three changes together into one commit
 ## Tag
 
     # Review commits:
-    for l in cordova-plugman cordova-cli; do ( cd $l; git log -p origin/master..master ); done  
+    for l in cordova-plugman cordova-cli cordova-lib; do ( cd $l; git log -p origin/master..master ); done
     # Tag
-    for l in cordova-plugman cordova-cli; do ( cd $l; v="$(grep '"version"' package.json | cut -d'"' -f4)"; git tag $v ); done
+    for l in cordova-plugman cordova-cli cordova-lib/cordova-lib; do ( cd $l; v="$(grep '"version"' package.json | cut -d'"' -f4)"; git tag $v ); done
 
 ## Re-introduce -dev suffix to versions
 
@@ -157,11 +158,11 @@ Ensure you have the svn repos checked out:
 
 Create archives from your tags:
 
-    coho create-archive -r plugman -r cli --dest cordova-dist-dev/$JIRA
+    coho create-archive -r plugman -r cli -r lib --dest cordova-dist-dev/$JIRA
 
 Sanity Check:
 
-    coho verify-archive cordova-dist-dev/$JIRA/*.zip
+    coho verify-archive cordova-dist-dev/$JIRA/*.tgz
 
 Upload:
 
@@ -192,7 +193,7 @@ __Body:__
     https://dist.apache.org/repos/dist/dev/cordova/CB-XXXX/
 
     The packages were published from their corresponding git tags:
-    PASTE OUTPUT OF: coho print-tags -r plugman -r cli
+    PASTE OUTPUT OF: coho print-tags -r lib -r cli -r plugman
 
     Upon a successful vote I will upload the archives to dist/, publish them to NPM, and post the corresponding blog post.
 
@@ -250,9 +251,11 @@ Find your release here: https://dist.apache.org/repos/dist/release/cordova/tools
 
 ## Publish to NPM
 
+    npm publish cordova-dist/tools/cordova-lib-*.tgz
     npm publish cordova-dist/tools/cordova-cli-*.tgz
     npm publish cordova-dist/tools/cordova-plugman-*.tgz
 
+
 If npm publish fails for you, run `npm owner ls PACKAGENAME` to see if you are an owner. If you aren't, ask one of the owners to add you.
 
 If you have already published the package under the `rc` tag, then you will have to run `npm tag cordova@version latest`
@@ -270,7 +273,7 @@ If you have already published the package under the `rc` tag, then you will have
 Subject: [ANNOUNCEMENT] Tools Release
 
     Cordova-cli@VERSION & Plugman@VERSION has been released!
-    
+
     You can view the release blog post at LINK_TO_BLOG
 
 ## Do other announcements

http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/57e9cdd7/src/create-verify-archive.js
----------------------------------------------------------------------
diff --git a/src/create-verify-archive.js b/src/create-verify-archive.js
index 7b98ac4..8260de0 100644
--- a/src/create-verify-archive.js
+++ b/src/create-verify-archive.js
@@ -68,14 +68,16 @@ exports.createCommand = function*(argv) {
 
     yield repoutil.forEachRepo(repos, function*(repo) {
         var tag = argv.tag || (yield gitutil.findMostRecentTag());
+        yield gitutil.gitCheckout(tag);
         print('Creating archive of ' + repo.repoName + '@' + tag);
-        yield gitutil.gitCheckout('master');
 
-        if (repo.id==='plugman'|| repo.id==='cli') {
+        if (repo.id==='plugman' || repo.id==='cli' || repo.id==='lib') {
             if (yield gitutil.pendingChangesExist()) {
                 apputil.fatal('Aborting because pending changes exist in ' + repo.repoName);
             }
-            var tgzname = yield executil.execHelper(executil.ARGS('npm pack'), true);
+            var cmd = 'npm pack';
+            if (repo.id==='lib') cmd = 'npm pack cordova-lib'
+            var tgzname = yield executil.execHelper(executil.ARGS(cmd), true);
             var outPath = path.join(absOutDir, 'cordova-' + tgzname);
             shelljs.mv(tgzname, outPath);
         } else {
@@ -136,4 +138,3 @@ function *computeHash(path, algo) {
 function extractHashFromOutput(output) {
     return output.replace(/.*?:/, '').replace(/\s*/g, '').toLowerCase();
 }
-