You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2020/05/12 02:18:08 UTC
[cordova-coho] branch master updated: feat: update version
information from Api.js (#269)
This is an automated email from the ASF dual-hosted git repository.
erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-coho.git
The following commit(s) were added to refs/heads/master by this push:
new 8bd114c feat: update version information from Api.js (#269)
8bd114c is described below
commit 8bd114c037c555e0b7355ef302a5338c7a0fbe53
Author: エリス <er...@users.noreply.github.com>
AuthorDate: Tue May 12 11:17:57 2020 +0900
feat: update version information from Api.js (#269)
---
src/versionutil.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/versionutil.js b/src/versionutil.js
index 16ba598..89e6d0a 100644
--- a/src/versionutil.js
+++ b/src/versionutil.js
@@ -100,9 +100,21 @@ exports.updateRepoVersion = function * updateRepoVersion (repo, version, opts) {
});
shelljs.config.fatal = true;
+
+ // Old version location which still exists for some platforms that have not been updated.
glob.sync('{bin/,}template{s,}/{scripts/,}cordova/version').forEach(f => {
shelljs.sed('-i', /\bVERSION\s*=.+?;/, `VERSION = '${version}';`, f);
});
+
+ /**
+ * Version information has be temporary migrating to Api.js...
+ * This is because the `cordova/version` shebang line fails to be rewired in node 12.x.
+ * Eventually, the version information should come from package.json
+ */
+ glob.sync('{bin/,}template{s,}/{scripts/,}cordova/Api.js').forEach(f => {
+ shelljs.sed('-i', /const VERSION\s=\s'.*';/, `const VERSION = '${version}';`, f);
+ });
+
if (repo.id === 'android') {
shelljs.sed('-i', /CORDOVA_VERSION.*=.*;/, 'CORDOVA_VERSION = "' + version + '";', path.join('framework', 'src', 'org', 'apache', 'cordova', 'CordovaWebView.java'));
// Set build.gradle version, vcsTag, and name
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org