Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
improve platform usage hint (don't show 'mac' on non macOS systems)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Zeug committed Mar 6, 2017
1 parent dcc3a21 commit eece787
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const runSeq = require('run-sequence');

// parse commandline arguments
const args = process.argv.slice(2);
const platforms = ['mac', 'linux', 'win'];
const platforms = (process.platform === 'darwin') ? ['mac', 'linux', 'win'] : ['linux', 'win'];
const options = minimist(args, {
string: ['walletSource'],
boolean: _.flatten(['wallet', platforms]),
Expand All @@ -32,8 +32,10 @@ console.log('Electron version:', require('electron/package.json').version);
if (_.isEmpty(_.intersection(args, ['--wallet']))) {
console.log('Many gulp tasks can be run in wallet mode using: --wallet');
}
if (_.isEmpty(_.intersection(args, ['--mac', '--linux', '--win']))) {
console.log('To specify a platform (default: all) use: --mac --win --linux');

const platformFlags = platforms.map((platform) => { return `--${platform}`; });
if (_.isEmpty(_.intersection(args, platformFlags))) {
console.log(`To specify a platform (default: all) use: ${platformFlags.join(' ')}`);
_.each(platforms, (platform) => { options[platform] = true; }); // activate all platform flags
}

Expand Down

0 comments on commit eece787

Please sign in to comment.