You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/10/22 00:20:15 UTC

git commit: removed shrinkwrap instructions & added pinning

Repository: cordova-coho
Updated Branches:
  refs/heads/master 4f34b358c -> aab5e79fc


removed shrinkwrap instructions & added pinning

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

Branch: refs/heads/master
Commit: aab5e79fc134985039e3b37f8594a0ed9cfd2c4e
Parents: 4f34b35
Author: Steve Gill <st...@adobe.com>
Authored: Tue Oct 21 15:19:23 2014 -0700
Committer: Steve Gill <st...@adobe.com>
Committed: Tue Oct 21 15:19:23 2014 -0700

----------------------------------------------------------------------
 docs/tools-release-process.md | 143 ++++++++++++++++++++-----------------
 1 file changed, 79 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/aab5e79f/docs/tools-release-process.md
----------------------------------------------------------------------
diff --git a/docs/tools-release-process.md b/docs/tools-release-process.md
index 53de85b..6024b83 100644
--- a/docs/tools-release-process.md
+++ b/docs/tools-release-process.md
@@ -54,14 +54,27 @@ E.g.:
 
     JIRA="CB-????" # Set this to the release bug.
 
-## Test
+## Update and Pin Dependencies
 Ensure you're up-to-date:
 
     coho repo-update -r tools
+
+See if any dependencies are outdated
+
+    (cd cordova-js && npm outdated)
+    (cd cordova-lib/cordova-lib && npm outdated)
+    (cd cordova-plugman && npm outdated)
+    (cd cordova-cli && npm outdated)
+
+Update them in each project's `pacakge.json` file. Make sure to run through the test section below for compatability issues.
+
+## Test
+Link repos:
+
     (cd cordova-js && npm link)
     (cd cordova-lib/cordova-lib && rm -r node_modules && npm link cordova-js && npm install && npm link)
     (cd cordova-plugman && rm -r node_modules && npm link cordova-lib && npm install)
-    (cd cordova-cli && rm npm-shrinkwrap.json && rm -r node_modules && npm link cordova-lib && npm install)
+    (cd cordova-cli && rm -r node_modules && npm link cordova-lib && npm install)
 
 Ensure license headers are present everywhere. For reference, see this [background](http://www.apache.org/legal/src-headers.html).
 
@@ -89,13 +102,11 @@ Ensure that mobilespec creates okay via plugman:
     cordova-mobile-spec/createmobilespec/createmobilespec.js --plugman --android
     (cd mobilespec-android && cordova/run)
 
-Ensure unit tests pass:
+Ensure unit tests pass (plugman tests are included in lib):
 
     (cd cordova-lib/cordova-lib; npm test)
-
-    # plugman tests are included in cordova-lib above
     (cd cordova-cli; npm test)
-    (cd cordova-js; grunt test --platformVersion=3.6.0)
+    (cd cordova-js; grunt test --platformVersion=3.7.0)
 
 Add a comment to the JIRA issue stating what you tested, and what the results were.
 
@@ -135,57 +146,10 @@ Update the version of cordova-js that cordova-lib depends on:
     v="$(grep '"version"' cordova-js/package.json | cut -d'"' -f4)"
     sed -i '' -E 's/"cordova-js":.*/"cordova-js": "'$v'",/' cordova-lib/cordova-lib/package.json
 
-Before creating the shrinkwrap on the cli, do the following so that the shrinkwrap will have the correct content:
-
-Publish any dependent modules (cordova-lib, cordova-js) to npm before creating a shrinkwrap of the parent (cordova-cli). This enables the "from" field in the shrinkwrap to have the correct URL. And it prevents any of the submodule's devDependenies from appearing in a parent's shrinkwrap. If you have already packaged and published cordova-js, then you can omit that from the rest of the steps in this bullet level. Here are the steps to do that:
-
-First, commit everything in the dependent modules, tag, and push.
-
-    # Commit:
-    for l in cordova-lib/cordova-lib cordova-js; do ( cd $l; git add .; v="$(grep '"version"' package.json | cut -d'"' -f4)"; git commit -am "$JIRA Updated version and RELEASENOTES.md for release $v" ); done
-    # Review commits:
-    for l in cordova-lib cordova-js; do ( cd $l; git log -p origin/master..master ); done
-    # Tag
-    for l in cordova-lib/cordova-lib cordova-js; do ( cd $l; v="$(grep '"version"' package.json | cut -d'"' -f4)"; git tag $v ); done
-    # Push
-    for l in cordova-lib cordova-js; do ( cd $l; git push && git push --tags ); done
-
-Create an npm pack archive of the dependencies
-
-    coho create-archive -r js --dest cordova-dist-dev/$JIRA --tag 3.6.3
-    coho create-archive -r lib --dest cordova-dist-dev/$JIRA --tag 0.21.13
-
-You may want to check out the master branch of these again, as the `create-archive` command will leave them in a detached-head state at the desired tag
-
-    coho foreach -r js -r lib "git checkout master"
-
-Verify the archives
-
-    coho verify-archive cordova-dist-dev/$JIRA/cordova-js-*.tgz
-    coho verify-archive cordova-dist-dev/$JIRA/cordova-lib-*.tgz
-
-Next, publish these to npm, and be sure to use the "rc" tag in npm.
-
-    npm publish --tag rc cordova-dist-dev/$JIRA/cordova-js-*.tgz
-    npm publish --tag rc cordova-dist-dev/$JIRA/cordova-lib-*.tgz
- 
-Clear the npm cache. If you don't then the `from` and `resolved` fields in the shrinkwrap may not be generated properly.
-
-    npm cache clear
-
-Do a fresh install of the dependencies in cordova-lib, cordova-plugman, and cordova-cli, so that the `npm link` entries are gone, and cli installs lib and js from the npm instead of locally. This is so the "from" field appears correctly in the shrinkwrap. And so that none of the devDependencies are included from a dependent module (since the shrinkwrap process walks the node_modules directory tree instead of inspecting the package.json file of each dependency. Using npm link is great for development time, bad for packaging time).
-
-    (cd cordova-lib && rm -r node_modules && npm install)
-    (cd cordova-plugman && rm -r node_modules && npm install)
-    (cd cordova-cli && rm -r node_modules && npm install)
-
-Create npm-shrinkwrap.json in the cli. This is important especially when the cli depends on specific versions of lib and similar, because the shrinkwrap overrules the version dependencies in package.json. If the tools have any specific version dependencies, verify they are correct in the shrinkwrap after you complete this step.
-
-    (cd cordova-cli; npm shrinkwrap)
 
 Commit these changes together into one commit
 
-    for l in cordova-plugman cordova-cli; do ( cd $l; git add npm-shrinkwrap.json; v="$(grep '"version"' package.json | cut -d'"' -f4)"; git commit -am "$JIRA Updated version and RELEASENOTES.md for release $v" ); done
+    for l in cordova-plugman cordova-cli cordova-js cordova-lib; do ( cd $l; v="$(grep '"version"' package.json | cut -d'"' -f4)"; git commit -am "$JIRA Updated version and RELEASENOTES.md for release $v" ); done
 
 ## Tag
 
@@ -196,15 +160,12 @@ Commit these changes together into one commit
 
 ## Create release branches
 
-    (cd cordova-cli; git checkout -b 3.7.x master)
-    (cd cordova-lib/cordova-lib; git checkout -b 3.7.x master) 
+    (cd cordova-cli; git checkout -b 4.0.x master)
+    (cd cordova-lib/cordova-lib; git checkout -b 4.0.x master) 
+    (cd cordova-js; git checkout -b 3.7.x master)
+    (cd cordova-plugman; git checkout -b 0.2.x master) 
 
-## Re-introduce -dev suffix to versions and remove shrinkwrap
-
-    (cd cordova-lib/cordova-lib; git rm npm-shrinkwrap.json;)
-    (cd cordova-cli; git rm npm-shrinkwrap.json;)
-    (cd cordova-plugman; git rm npm-shrinkwrap.json;)
-    (cd cordova-js; git rm npm-shrinkwrap.json;)
+## Re-introduce -dev suffix to versions
 
     for l in cordova-lib/cordova-lib cordova-plugman cordova-cli cordova-js; do ( cd $l; v="$(grep '"version"' package.json | cut -d'"' -f4)"; if [[ $v != *-dev ]]; then v2="$(echo $v|awk -F"." '{$NF+=1}{print $0RT}' OFS="." ORS="")-dev"; echo "$l: Setting version to $v2"; sed -i '' -E 's/version":.*/version": "'$v2'",/' package.json; fi); done
     for l in cordova-lib/cordova-lib cordova-plugman cordova-cli cordova-js; do (cd $l; git commit -am "$JIRA Incremented package version to -dev"; git show ); done
@@ -229,7 +190,9 @@ Create archives from your tags: (the archives for lib were already created above
 Sanity Check:
 
     coho verify-archive cordova-dist-dev/$JIRA/plugman-*.tgz
-    coho verify-archive cordova-dist-dev/$JIRA/cordova-3*.tgz
+    coho verify-archive cordova-dist-dev/$JIRA/cordova-4*.tgz
+    coho verify-archive cordova-dist-dev/$JIRA/cordova-lib*.tgz
+    coho verify-archive cordova-dist-dev/$JIRA/cordova-js*.tgz
 
 Upload:
 
@@ -242,7 +205,7 @@ Next, publish these to npm, and be sure to use the "rc" tag in npm.
 
     npm publish --tag rc cordova-dist-dev/$JIRA/cordova-js-*.tgz
     npm publish --tag rc cordova-dist-dev/$JIRA/cordova-lib-*.tgz
-    npm publish --tag rc cordova-dist-dev/$JIRA/cordova-3.7.0.tgz
+    npm publish --tag rc cordova-dist-dev/$JIRA/cordova-4.*.tgz
     npm publish --tag rc cordova-dist-dev/$JIRA/plugman-*.tgz
 
 ## Test from NPM
@@ -379,4 +342,56 @@ If there are any dependencies or devDependencies that are out of date, open a Ji
 ## Finally:
 
  * Update *these instructions* if they were missing anything.
+ 
+## Outdated Shrinkwrap
+
+These instructions are being kept here inscase we decide to start using shrinkwrap again.
+
+Before creating the shrinkwrap on the cli, do the following so that the shrinkwrap will have the correct content:
+
+Publish any dependent modules (cordova-lib, cordova-js) to npm before creating a shrinkwrap of the parent (cordova-cli). This enables the "from" field in the shrinkwrap to have the correct URL. And it prevents any of the submodule's devDependenies from appearing in a parent's shrinkwrap. If you have already packaged and published cordova-js, then you can omit that from the rest of the steps in this bullet level. Here are the steps to do that:
+
+First, commit everything in the dependent modules, tag, and push.
+
+    # Commit:
+    for l in cordova-lib/cordova-lib cordova-js; do ( cd $l; git add .; v="$(grep '"version"' package.json | cut -d'"' -f4)"; git commit -am "$JIRA Updated version and RELEASENOTES.md for release $v" ); done
+    # Review commits:
+    for l in cordova-lib cordova-js; do ( cd $l; git log -p origin/master..master ); done
+    # Tag
+    for l in cordova-lib/cordova-lib cordova-js; do ( cd $l; v="$(grep '"version"' package.json | cut -d'"' -f4)"; git tag $v ); done
+    # Push
+    for l in cordova-lib cordova-js; do ( cd $l; git push && git push --tags ); done
+
+Create an npm pack archive of the dependencies
+
+    coho create-archive -r js --dest cordova-dist-dev/$JIRA --tag 3.6.3
+    coho create-archive -r lib --dest cordova-dist-dev/$JIRA --tag 0.21.13
+
+You may want to check out the master branch of these again, as the `create-archive` command will leave them in a detached-head state at the desired tag
+
+    coho foreach -r js -r lib "git checkout master"
+
+Verify the archives
+
+    coho verify-archive cordova-dist-dev/$JIRA/cordova-js-*.tgz
+    coho verify-archive cordova-dist-dev/$JIRA/cordova-lib-*.tgz
+
+Next, publish these to npm, and be sure to use the "rc" tag in npm.
+
+    npm publish --tag rc cordova-dist-dev/$JIRA/cordova-js-*.tgz
+    npm publish --tag rc cordova-dist-dev/$JIRA/cordova-lib-*.tgz
+ 
+Clear the npm cache. If you don't then the `from` and `resolved` fields in the shrinkwrap may not be generated properly.
+
+    npm cache clear
+
+Do a fresh install of the dependencies in cordova-lib, cordova-plugman, and cordova-cli, so that the `npm link` entries are gone, and cli installs lib and js from the npm instead of locally. This is so the "from" field appears correctly in the shrinkwrap. And so that none of the devDependencies are included from a dependent module (since the shrinkwrap process walks the node_modules directory tree instead of inspecting the package.json file of each dependency. Using npm link is great for development time, bad for packaging time).
+
+    (cd cordova-lib && rm -r node_modules && npm install)
+    (cd cordova-plugman && rm -r node_modules && npm install)
+    (cd cordova-cli && rm -r node_modules && npm install)
+
+Create npm-shrinkwrap.json in the cli. This is important especially when the cli depends on specific versions of lib and similar, because the shrinkwrap overrules the version dependencies in package.json. If the tools have any specific version dependencies, verify they are correct in the shrinkwrap after you complete this step.
+
+    (cd cordova-cli; npm shrinkwrap)
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org