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/06/20 01:30:03 UTC
[1/2] git commit: CB-6651 prepare release branch now updates version
in package.json file
Repository: cordova-coho
Updated Branches:
refs/heads/master eb9274f53 -> 079f75288
CB-6651 prepare release branch now updates version in package.json file
Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/25aaf5ae
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/25aaf5ae
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/25aaf5ae
Branch: refs/heads/master
Commit: 25aaf5ae05edde7c9faa1ce6acdee21bac2462e6
Parents: eb9274f
Author: Steven Gill <st...@gmail.com>
Authored: Thu Jun 19 16:28:27 2014 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Thu Jun 19 16:28:27 2014 -0700
----------------------------------------------------------------------
src/cadance-release.js | 16 ++++++++++++++++
src/repoutil.js | 15 +++++++--------
2 files changed, 23 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/25aaf5ae/src/cadance-release.js
----------------------------------------------------------------------
diff --git a/src/cadance-release.js b/src/cadance-release.js
index dcdd245..3cd9b21 100644
--- a/src/cadance-release.js
+++ b/src/cadance-release.js
@@ -134,6 +134,22 @@ function *updateRepoVersion(repo, version) {
} else {
console.warn('No VERSION file exists in repo ' + repo.repoName);
}
+
+ // Update the package.json VERSION.
+ var packageFilePaths = repo.packageFilePaths || ['package.json'];
+ if (fs.existsSync(packageFilePaths[0])) {
+ fs.readFile(packageFilePaths[0], {encoding: 'utf-8'},function (err, data) {
+ if (err) throw err;
+ var packageJSON = JSON.parse(data);
+ packageJSON.version = version;
+ fs.writeFileSync(packageFilePaths[0], JSON.stringify(packageJSON, null, " "));
+ });
+ if (!(yield gitutil.pendingChangesExist())) {
+ print('package.json file was already up-to-date.');
+ }
+ } else {
+ console.warn('No package.json file exists in repo ' + repo.repoName);
+ }
if (yield gitutil.pendingChangesExist()) {
yield executil.execHelper(executil.ARGS('git commit -am', 'Set VERSION to ' + version + ' (via coho)'));
http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/25aaf5ae/src/repoutil.js
----------------------------------------------------------------------
diff --git a/src/repoutil.js b/src/repoutil.js
index bb0a5b3..08fcdbd 100644
--- a/src/repoutil.js
+++ b/src/repoutil.js
@@ -48,12 +48,9 @@ var platformRepos = [
repoName: 'cordova-blackberry',
jiraComponentName: 'BlackBerry',
cordovaJsSrcName: 'cordova.blackberry10.js',
- cordovaJsPaths: [
- path.join('blackberry10', 'javascript', 'cordova.blackberry10.js')
- ],
- versionFilePaths: [
- path.join('blackberry10', 'VERSION'),
- ]
+ cordovaJsPaths: [path.join('blackberry10', 'javascript', 'cordova.blackberry10.js')],
+ versionFilePaths: [path.join('blackberry10', 'VERSION')],
+ packageFilePaths: [path.join('blackberry10', 'package.json')]
}, {
title: 'Windows',
id: 'windows',
@@ -61,14 +58,16 @@ var platformRepos = [
jiraComponentName: 'Windows 8',
cordovaJsSrcName: 'cordova.windows8.js',
cordovaJsPaths: ['windows8/cordova.js', 'windows8/template/www/cordova.js'],
- versionFilePaths: [path.join('windows8', 'VERSION'), path.join('windows8', 'template', 'VERSION')]
+ versionFilePaths: [path.join('windows8', 'VERSION'), path.join('windows8', 'template', 'VERSION')],
+ packageFilePaths: [path.join('windows8', 'package.json')]
}, {
title: 'Windows Phone 7 & 8',
id: 'wp8',
repoName: 'cordova-wp8',
jiraComponentName: 'WP8',
cordovaJsSrcName: 'cordova.windowsphone.js',
- cordovaJsPaths: ['common/www/cordova.js']
+ cordovaJsPaths: ['common/www/cordova.js'],
+ packageFilePaths: [path.join('wp8', 'package.json')]
}, {
title: 'Firefox OS',
id: 'firefoxos',
[2/2] git commit: updated cadence release doc to reflect auto
package.json update
Posted by st...@apache.org.
updated cadence release doc to reflect auto package.json update
Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/079f7528
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/079f7528
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/079f7528
Branch: refs/heads/master
Commit: 079f75288803b48f95098c60ec3ffde0211dad74
Parents: 25aaf5a
Author: Steven Gill <st...@gmail.com>
Authored: Thu Jun 19 16:29:49 2014 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Thu Jun 19 16:29:49 2014 -0700
----------------------------------------------------------------------
docs/cadence-release-process.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/079f7528/docs/cadence-release-process.md
----------------------------------------------------------------------
diff --git a/docs/cadence-release-process.md b/docs/cadence-release-process.md
index 08ef96b..077287f 100644
--- a/docs/cadence-release-process.md
+++ b/docs/cadence-release-process.md
@@ -94,7 +94,7 @@ This step involves:
* Updating version numbers
* Creating release branches
* Creating git tags
- * For now, please manually updated the version in package.json file until coho adds that to prepare-release-branch
+ * Updating version in package.json files
Coho automates these steps (replace android with your platform):