You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2016/10/05 19:29:29 UTC
ios commit: CB-11860 - Print a warning if system ruby is not in use
Repository: cordova-ios
Updated Branches:
refs/heads/master 0231fcbd1 -> a47b9d9ff
CB-11860 - Print a warning if system ruby is not in use
This closes #261
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/a47b9d9f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/a47b9d9f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/a47b9d9f
Branch: refs/heads/master
Commit: a47b9d9ff9b66c3fae6f0ce1c3808ad0759125d0
Parents: 0231fcb
Author: Darryl Pogue <da...@ayogo.com>
Authored: Wed Oct 5 10:34:04 2016 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Oct 5 12:28:53 2016 -0700
----------------------------------------------------------------------
bin/templates/scripts/cordova/lib/build.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a47b9d9f/bin/templates/scripts/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/lib/build.js b/bin/templates/scripts/cordova/lib/build.js
index cfe017e..8e42105 100644
--- a/bin/templates/scripts/cordova/lib/build.js
+++ b/bin/templates/scripts/cordova/lib/build.js
@@ -118,6 +118,17 @@ module.exports.run = function (buildOpts) {
var buildOutputDir = path.join(projectPath, 'build', 'device');
+
+ function checkSystemRuby() {
+ var ruby_cmd = shell.which('ruby');
+
+ if (ruby_cmd != '/usr/bin/ruby') {
+ events.emit('warn', 'Non-system Ruby in use. This may cause packaging to fail.\n' +
+ 'If you use RVM, please run `rvm use system`.\n' +
+ 'If you use chruby, please run `chruby system`.');
+ }
+ }
+
function packageArchive() {
var xcodearchiveArgs = getXcodeArchiveArgs(projectName, projectPath, buildOutputDir, exportOptionsPath);
return spawn('xcodebuild', xcodearchiveArgs, projectPath);
@@ -148,6 +159,7 @@ module.exports.run = function (buildOpts) {
}
return Q.nfcall(fs.writeFile, exportOptionsPath, exportOptionsPlist, 'utf-8')
+ .then(checkSystemRuby)
.then(packageArchive)
.then(unpackIPA)
.then(moveApp);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org