You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by Apache Wiki <wi...@apache.org> on 2014/01/02 18:35:41 UTC

[Cordova Wiki] Update of "StepsForPluginRelease" by AndrewGrieve

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cordova Wiki" for change notification.

The "StepsForPluginRelease" page has been changed by AndrewGrieve:
https://wiki.apache.org/cordova/StepsForPluginRelease?action=diff&rev1=19&rev2=20

  
  {{{
    ./cordova-coho/coho repo-update -r plugins
-   ./cordova-coho/coho repo-status -r plugins -b dev --branch2 master --no-diff | grep "Commits exist"
+   ./cordova-coho/coho foreach -r plugins "git checkout dev"
+   ACTIVE=$(for l in cordova-plugin-*; do ( cd $l; git log --pretty=format:'* %s' --topo-order --no-merges master..dev | grep -v "Incremented plugin version" > /dev/null && echo $l); done | xargs echo)
+   JIRA="CB-????" # Set this to the release bug.
  }}}
- 
-  * Add a comment to the JIRA issue stating which plugins had commits
  
  == Update RELEASENOTES.md & Version ==
   * For each plugin that has unreleased commits:
-    a. Remove the ''-dev'' suffix on the version in plugin.xml. If the changes merit it, use SEMVER to update version. (manual process for now)
-    a. Update its RELEASENOTES.md file with changes (See below, need to manually enter in the date. ex Dec 4, 2013)
-    a. Commit these two changes together to the `dev` branch (See below)
+    a. Remove the ''-dev'' suffix on the version in plugin.xml.
+ {{{
+ for l in $ACTIVE; do ( cd $l; v="$(grep version= plugin.xml | grep -v xml | grep -v engine | grep -v param | cut -d'"' -f2)"; if [[ $v = *-dev ]]; then v2="${v%-dev}"; echo "$l: Setting version to $v2"; sed -i '' -E s:"version=\"$v\":version=\"$v2\":" plugin.xml; fi) ; done
+ }}}
+    a. 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 master..dev | grep -v "Incremented plugin version" ); done
+ }}}
  
+    a. Update its RELEASENOTES.md file with changes
  {{{
-   # Add new heading to release notes with version and date (replace $DATE & CB-#### below)
+   # Add new heading to release notes with version and date
+   DATE=$(date "+%h %d, %Y")
-   for l in cordova-plugin-*; do ( cd $l; v="$(grep version= plugin.xml | grep -v xml | grep -v engine | grep -v param | cut -d'"' -f2)"; echo -e "\n### $v ($DATE)" >> RELEASENOTES.md; git log --pretty=format:'* %s' --topo-order --no-merges master..dev >> RELEASENOTES.md); done;
+   for l in $ACTIVE; do ( cd $l; v="$(grep version= plugin.xml | grep -v xml | grep -v engine | grep -v param | cut -d'"' -f2)"; echo -e "\n### $v ($DATE)" >> RELEASENOTES.md; git log --pretty=format:'* %s' --topo-order --no-merges master..dev | grep -v "Incremented plugin version" >> RELEASENOTES.md); done
+   # Then curate:
+   vim ${ACTIVE// //RELEASENOTES.md }
+ }}}
+ 
+    a. Add a comment to the JIRA issue with the output from:
+ {{{
+ for l in $ACTIVE; do ( cd $l; v="$(grep version= plugin.xml | grep -v xml | grep -v engine | grep -v param | cut -d'"' -f2)"; echo $l@$v; awk '{ if (p) print } /Jan 02/ { p = 1 } ' < RELEASENOTES.md; echo); done
+ }}}
+ 
+    a. Commit these two changes together to the `dev` branch
+ {{{
-   for l in cordova-plugin-*; do ( cd $l; v="$(grep version= plugin.xml | grep -v xml | grep -v engine | grep -v param | cut -d'"' -f2)"; git commit -am "[CB-####] Updated version and RELEASENOTES.md for release $v"); done;
+   for l in $ACTIVE; do ( cd $l; v="$(grep version= plugin.xml | grep -v xml | grep -v engine | grep -v param | cut -d'"' -f2)"; git commit -am "$JIRA Updated version and RELEASENOTES.md for release $v"); done
  }}}
  
  
  == Merge Changes into master & tag ==
  {{{
+   for l in $ACTIVE; do ( cd $l; git checkout master; git merge dev --ff-only ); done
-   ./cordova-coho/coho foreach -r plugins "git checkout master"
-   ./cordova-coho/coho foreach -r plugins "git merge dev --ff-only"
-   for l in cordova-plugin-*; do ( cd $l; v="r$(grep version= plugin.xml | grep -v xml | grep -v engine | grep -v param | cut -d'"' -f2)"; echo "Tagging $l to $v"; git tag "$v" ); done
+   for l in $ACTIVE; do ( cd $l; v="r$(grep version= plugin.xml | grep -v xml | grep -v engine | grep -v param | cut -d'"' -f2)"; echo "Tagging $l to $v"; git tag "$v" ); done
  }}}
  
  == Update dev branch's version ==
   * For each plugin that had unreleased commits:
     * Rationale: So that the version on dev is greater than the version on master.
  {{{
-   ./cordova-coho/coho foreach -r plugins "git checkout dev"
+   for l in $ACTIVE; do ( cd $l; git checkout dev ); done
-   for l in cordova-plugin-*; do ( cd $l; v="$(grep version= plugin.xml | grep -v xml | grep -v engine | grep -v param | cut -d'"' -f2)"; 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=\"$v\":version=\"$v2\":" plugin.xml; fi) ; done
+   for l in $ACTIVE; do ( cd $l; v="$(grep version= plugin.xml | grep -v xml | grep -v engine | grep -v param | cut -d'"' -f2)"; 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=\"$v\":version=\"$v2\":" plugin.xml; fi) ; done
-   for l in cordova-plugin-*; do (cd $l; git commit -am '[CB-####] Incremented plugin version on dev branch.' ); done
+   for l in $ACTIVE; do (cd $l; git commit -am "$JIRA Incremented plugin version on dev branch." ); done
  }}}
  
  == Test ==
@@ -72, +89 @@

    # Plugin Changes:
    ./cordova-coho/coho repo-status -r plugins -b dev -b master  
    ./cordova-coho/coho repo-push -r plugins -b dev -b master
-   ./cordova-coho/coho foreach -r plugins "git push --tags"
-   ./cordova-coho/coho foreach -r plugins "git checkout master"
+   for l in $ACTIVE; do ( cd $l; git push --tags ); done
+   for l in $ACTIVE; do ( cd $l; git checkout master ); done
-   for l in cordova-plugin-*; do(cd $l; plugman publish .); done
+   for l in $ACTIVE; do ( cd $l; plugman publish . ); done
  }}}
  
  == Close JIRA Issue ==