cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [2/2] cordova-coho git commit: Tweaks to plugin release process
Date Thu, 05 Feb 2015 14:49:44 GMT
Tweaks to plugin release process


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

Branch: refs/heads/master
Commit: 8b772020b0686ff4a587d4edd1c1eb3ec1c2fffd
Parents: 3f698dd
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Feb 5 09:49:35 2015 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Feb 5 09:49:35 2015 -0500

----------------------------------------------------------------------
 docs/plugins-release-process.md | 29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/8b772020/docs/plugins-release-process.md
----------------------------------------------------------------------
diff --git a/docs/plugins-release-process.md b/docs/plugins-release-process.md
index eed2eb1..2aed4ec 100644
--- a/docs/plugins-release-process.md
+++ b/docs/plugins-release-process.md
@@ -29,11 +29,10 @@ Core Plugins are released at most weekly (see: [versioning-and-release-strategy.
 
 A plugins release is performed by a single person each week. We call this person the "Release
Manager". How to select the Release Manager is still TDB.
 
-TODO: add in RAT instruction (via coho) for next release
-
 TODO: We may want to be using [signed tags](http://git-scm.com/book/en/Git-Basics-Tagging),
or at least annotated tags.
 
 TODO: Add step about ensuring plugman owner
+  * Note: can base this on: https://github.com/MobileChromeApps/mobile-chrome-apps/blob/master/dev-bin/check-published-plugin.js
 
 TODO: Add step about releasing cordova-plugins
 
@@ -64,17 +63,18 @@ TODO: Should not mention testing other than checking medic
     # Update your repos
     coho repo-status -r plugins -b master
     coho repo-update -r plugins
+    coho repo-clone -r plugins
     coho foreach -r plugins "git checkout master"
 
 ## Identify which plugins have changes
 
-    coho repo-update -r plugins
-    coho foreach -r plugins "git checkout master"
-    ACTIVE=$(for l in cordova-plugin-*; do ( cd $l; git log --pretty=format:'* %s' --topo-order
--no-merges $(git describe --tags --abbrev=0)..master | grep -v "Incremented plugin version"
> /dev/null && echo $l); done | xargs echo)
+    ACTIVE=$(for l in cordova-plugin-*; do ( cd $l; last_release=$(git describe --tags --abbrev=0
2>/dev/null || git rev-list --max-parents=0 HEAD); git log --pretty=format:'* %s' --topo-order
--no-merges $last_release..master | grep -v "Incremented plugin version" > /dev/null &&
echo $l); done | xargs echo)
+    echo $ACTIVE
 
 ## Ensure license headers are present everywhere:
 
     coho audit-license-headers -r plugins | less
+    # Tip: Skim by searching for "Unknown Licenses"
 
 For reference, see this [background](http://www.apache.org/legal/src-headers.html)
 
@@ -89,7 +89,7 @@ Remove the ''-dev'' suffix on the version in plugin.xml.
 
 If the changes merit it, manually bump the major / minor version instead of the micro. Manual
process, but list the changes via:
 
-    for l in $ACTIVE; do ( cd $l; echo $l; git log --pretty=format:'* %s' --topo-order --no-merges
$(git describe --tags --abbrev=0)..master | grep -v "Incremented plugin version" ); done
+    for l in $ACTIVE; do ( cd $l; echo $l; last_release=$(git describe --tags --abbrev=0
2>/dev/null || git rev-list --max-parents=0 HEAD); git log --pretty=format:'* %s' --topo-order
--no-merges $last_release..master | grep -v "Incremented plugin version" ); done
 
 For each of the plugins that have a test project inside it, update the version number there
(`cordova-plugin-*/tests/plugin.xml`) to match the version of the plugin itself (`cordova-plugin-*/plugin.xml`).
 
@@ -99,15 +99,11 @@ Update its RELEASENOTES.md file with changes
 
     # Add new heading to release notes with version and date
     DATE=$(date "+%h %d, %Y")
-    for l in $ACTIVE; do ( cd $l; v="$(grep version= plugin.xml | grep -v xml | head -n1
| cut -d'"' -f2)"; echo -e "\n### $v ($DATE)" >> RELEASENOTES.md; git log --pretty=format:'*
%s' --topo-order --no-merges $(git describe --tags --abbrev=0)..master | grep -v "Incremented
plugin version" >> RELEASENOTES.md); done
+    for l in $ACTIVE; do ( cd $l; last_release=$(git describe --tags --abbrev=0 2>/dev/null
|| git rev-list --max-parents=0 HEAD); v="$(grep version= plugin.xml | grep -v xml | head
-n1 | cut -d'"' -f2)"; echo -e "\n### $v ($DATE)" >> RELEASENOTES.md; git log --pretty=format:'*
%s' --topo-order --no-merges $last_release..master | grep -v "Incremented plugin version"
>> RELEASENOTES.md); done
     # Then curate:
     vim ${ACTIVE// //RELEASENOTES.md }/RELEASENOTES.md
 
-Print the curated changes for plugins (save this text for the blog post, after deleting the
unnecessary lines):
-
-    for l in $ACTIVE; do ( cd $l; v="$(grep version= plugin.xml | grep -v xml | head -n1
| cut -d'"' -f2)"; id=$(grep -o '\bid=\"[^\"]*\"' plugin.xml | head -n1 | cut -d'"' -f2);
 echo -e "\n\`$id@$v\`"; git diff -U0 RELEASENOTES.md | sed 's/^\+//' ); done
-
-Add a comment to the JIRA issue with the output from:
+Add a comment to the JIRA issue with the output from (we'll use this lated for the blog post):
 
     for l in $ACTIVE; do ( cd $l; id="$(grep id= plugin.xml | grep -v xml | grep -v engine
| grep -v param | head -1 | cut -d'"' -f2)"; v="$(grep version= plugin.xml | grep -v xml |
head -n1 | cut -d'"' -f2)"; echo $id@$v; awk "{ if (p) print } /$DATE/ { p = 1 } " < RELEASENOTES.md;
echo); done
 
@@ -120,12 +116,11 @@ Commit these changes together (plugin.xml, RELEASENOTES.md, tests/plugin.xml)
     for l in $ACTIVE; do ( cd $l; v="r$(grep version= plugin.xml | grep -v xml | head -n1
| cut -d'"' -f2)"; echo "Tagging $l to $v"; git tag "$v" ); done
 
 ## Test
- * Create mobilespec using the old versions of plugins (by checking them out to the previous
tag)
+ * Create mobilespec and sanity check all plugins on at least one platform (preferably, a
released version of the platform and not master)
  * Run through mobilespec, ensuring to do manual tests that relate to changes in the RELEASENOTES.md
 
-## Update version
+## Update version to add back -dev suffix
 
-    # update the plugin
     for l in $ACTIVE; do ( cd $l; v="$(grep version= plugin.xml | grep -v xml | head -n1
| cut -d'"' -f2)"; v_no_dev="${v%-dev}"; if [ "$v" = "$v_no_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=\"$v\":version=\"$v2\":" plugin.xml; fi) ; done
     # update the nested test
     for l in $ACTIVE; do ( cd $l; v="$(grep version= plugin.xml | grep -v xml | head -n1
| cut -d'"' -f2)"; vt="$(grep version= tests/plugin.xml | grep -v xml | head -n1 | cut -d'"'
-f2)"; if [ "$v" != "$vt" ]; then echo "$l: Setting version to $v"; sed -i '' -E s:"version=\"$vt\":version=\"$v\":"
tests/plugin.xml; fi); done
@@ -135,8 +130,8 @@ Commit these changes together (plugin.xml, RELEASENOTES.md, tests/plugin.xml)
     # Sanity check:
     coho repo-status -r plugins
     coho foreach -r plugins "git status -s"
-    # Push:
-    for l in $ACTIVE; do ( cd $l; git push --tags https://git-wip-us.apache.org/repos/asf/$l.git
master); done
+    # Push: (assumes "origin" is apache remote)
+    for l in $ACTIVE; do ( cd $l; tag=$(git describe --tags --abbrev=0); echo $l; set -x;
git push origin master refs/tags/$tag); done
     # Check that it was all successful:
     coho repo-update -r plugins
     coho repo-status -r plugins


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


Mime
View raw message