Skip to content

Commit

Permalink
Merge pull request #6 from niconaso/master
Browse files Browse the repository at this point in the history
Check OS
  • Loading branch information
ReallySmallSoftware authored Mar 18, 2018
2 parents d463b6c + 9e2a4df commit da991ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/after_plugin_add.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

var iosHelper = require("./lib/ios-helper");
var utilities = require("./lib/utilities");
var os = require('os');

module.exports = function(context) {

var platforms = context.opts.cordova.platforms;

// Add a build phase which runs a shell script that executes the Crashlytics
// run command line tool which uploads the debug symbols at build time.
if (platforms.indexOf("ios") !== -1) {
if (platforms.indexOf("ios") !== -1 && os.platform() === 'darwin') {
var xcodeProjectPath = utilities.getXcodeProjectPath(context);
iosHelper.removeShellScriptBuildPhase(context, xcodeProjectPath);
iosHelper.addShellScriptBuildPhase(context, xcodeProjectPath);
Expand Down
3 changes: 2 additions & 1 deletion scripts/before_plugin_rm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

var iosHelper = require("./lib/ios-helper");
var utilities = require("./lib/utilities");
var os = require('os');

module.exports = function(context) {

var platforms = context.opts.cordova.platforms;

// Remove the build script that was added when the plugin was installed.
if (platforms.indexOf("ios") !== -1) {
if (platforms.indexOf("ios") !== -1 && os.platform() === 'darwin') {
var xcodeProjectPath = utilities.getXcodeProjectPath(context);
iosHelper.removeShellScriptBuildPhase(context, xcodeProjectPath);
}
Expand Down

0 comments on commit da991ae

Please sign in to comment.