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 2015/04/15 23:55:32 UTC

cordova-coho git commit: Added steps to update package.json version

Repository: cordova-coho
Updated Branches:
  refs/heads/master adc761c71 -> a8229ec88


Added steps to update package.json version

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

Branch: refs/heads/master
Commit: a8229ec88116b5ea961fa01490cfa6d35d56c33d
Parents: adc761c
Author: Steve Gill <st...@adobe.com>
Authored: Wed Apr 15 14:54:19 2015 -0700
Committer: Steve Gill <st...@adobe.com>
Committed: Wed Apr 15 14:54:19 2015 -0700

----------------------------------------------------------------------
 docs/plugins-release-process.md | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/a8229ec8/docs/plugins-release-process.md
----------------------------------------------------------------------
diff --git a/docs/plugins-release-process.md b/docs/plugins-release-process.md
index e8ebc92..90b35b4 100644
--- a/docs/plugins-release-process.md
+++ b/docs/plugins-release-process.md
@@ -85,7 +85,11 @@ For reference, see this [background](http://www.apache.org/legal/src-headers.htm
 ## Update RELEASENOTES.md & Version
 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 | head -n1 | cut -d'"' -f2)"; v2="${v%-dev}"; if [ "$v" != "$v2" ]; then 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 | head -n1 | cut -d'"' -f2)"; v2="${v%-dev}"; if [ "$v" != "$v2" ]; then echo "$l: Setting version in plugin.xml to $v2"; sed -i '' -E s:"version=\"$v\":version=\"$v2\":" plugin.xml; fi) ; done
+
+Remove the ''-dev'' suffix on the version in package.json.
+
+    for l in $ACTIVE; do ( cd $l; v="$(grep -m 1 '"version"' package.json | cut -d'"' -f4)"; if [[ $v = *-dev ]]; then v2="${v%-dev}"; echo "$l: Setting version in package.json to $v2"; sed -i '' -E 's/version":.*/version": "'$v2'",/' package.json; fi) ; done
 
 If the changes merit it, manually bump the major / minor version instead of the micro. Manual process, but list the changes via:
 
@@ -123,7 +127,9 @@ Reply to the DISCUSS thread with a link to the updated release notes.
 
 ## Update version to add back -dev suffix
 
-    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
+    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 in plugin.xml to $v2"; sed -i '' -E s:"version=\"$v\":version=\"$v2\":" plugin.xml; fi) ; done
+    # update package.json
+    for l in $ACTIVE; do ( cd $l; v="$(grep -m 1 '"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 in package.json to $v2"; sed -i '' -E 's/version":.*/version": "'$v2'",/' package.json; 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
     for l in $ACTIVE; do (cd $l; git commit -am "$JIRA Incremented plugin version." ); done


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