Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emit xcodebuild & other spawned CLI commands #479

Merged
merged 1 commit into from Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/templates/scripts/cordova/lib/Podfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ Podfile.prototype.install = function (requirementsCheckerFunction) {
var opts = {};
opts.cwd = path.join(this.path, '..'); // parent path of this Podfile
opts.stdio = 'pipe';
opts.printCommand = true;
var first = true;
var self = this;

Expand Down
4 changes: 2 additions & 2 deletions bin/templates/scripts/cordova/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ module.exports.run = function (buildOpts) {
shell.rm('-rf', buildOutputDir);

var xcodebuildArgs = getXcodeBuildArgs(projectName, projectPath, configuration, buildOpts.device, buildOpts.buildFlag, emulatorTarget, buildOpts.automaticProvisioning);
return superspawn.spawn('xcodebuild', xcodebuildArgs, { cwd: projectPath });
return superspawn.spawn('xcodebuild', xcodebuildArgs, { cwd: projectPath, printCommand: true });

}).then(function () {
if (!buildOpts.device || buildOpts.noSign) {
Expand Down Expand Up @@ -224,7 +224,7 @@ module.exports.run = function (buildOpts) {

function packageArchive () {
var xcodearchiveArgs = getXcodeArchiveArgs(projectName, projectPath, buildOutputDir, exportOptionsPath, buildOpts.automaticProvisioning);
return superspawn.spawn('xcodebuild', xcodearchiveArgs, { cwd: projectPath });
return superspawn.spawn('xcodebuild', xcodearchiveArgs, { cwd: projectPath, printCommand: true });
}

return Q.nfcall(fs.writeFile, exportOptionsPath, exportOptionsPlist, 'utf-8')
Expand Down
4 changes: 2 additions & 2 deletions bin/templates/scripts/cordova/lib/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ module.exports.run = function () {
return Q.reject('No Xcode project found in ' + projectPath);
}

return superspawn.spawn('xcodebuild', ['-project', projectName, '-configuration', 'Debug', '-alltargets', 'clean'], { cwd: projectPath })
return superspawn.spawn('xcodebuild', ['-project', projectName, '-configuration', 'Debug', '-alltargets', 'clean'], { cwd: projectPath, printCommand: true })
.then(function () {
return superspawn.spawn('xcodebuild', ['-project', projectName, '-configuration', 'Release', '-alltargets', 'clean'], { cwd: projectPath });
return superspawn.spawn('xcodebuild', ['-project', projectName, '-configuration', 'Release', '-alltargets', 'clean'], { cwd: projectPath, printCommand: true });
}).then(function () {
return shell.rm('-rf', path.join(projectPath, 'build'));
});
Expand Down
8 changes: 4 additions & 4 deletions bin/templates/scripts/cordova/lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module.exports.run = function (runOptions) {
var ipafile = path.join(buildOutputDir, projectName + '.ipa');

// unpack the existing platform/ios/build/device/appname.ipa (zipfile), will create a Payload folder
return superspawn.spawn('unzip', [ '-o', '-qq', ipafile ], { cwd: buildOutputDir });
return superspawn.spawn('unzip', [ '-o', '-qq', ipafile ], { cwd: buildOutputDir, printCommand: true });
})
.then(function () {
// Uncompress IPA (zip file)
Expand Down Expand Up @@ -148,7 +148,7 @@ function filterSupportedArgs (args) {
* @return {Promise} Fullfilled when any device is connected, rejected otherwise
*/
function checkDeviceConnected () {
return superspawn.spawn('ios-deploy', ['-c', '-t', '1']);
return superspawn.spawn('ios-deploy', ['-c', '-t', '1'], { printCommand: true });
}

/**
Expand All @@ -160,9 +160,9 @@ function checkDeviceConnected () {
function deployToDevice (appPath, target, extraArgs) {
// Deploying to device...
if (target) {
return superspawn.spawn('ios-deploy', ['--justlaunch', '-d', '-b', appPath, '-i', target].concat(extraArgs));
return superspawn.spawn('ios-deploy', ['--justlaunch', '-d', '-b', appPath, '-i', target].concat(extraArgs), { printCommand: true });
} else {
return superspawn.spawn('ios-deploy', ['--justlaunch', '--no-wifi', '-d', '-b', appPath].concat(extraArgs));
return superspawn.spawn('ios-deploy', ['--justlaunch', '--no-wifi', '-d', '-b', appPath].concat(extraArgs), { printCommand: true });
}
}

Expand Down