Build local architecture CLI arg
Summary: The current '--mac' arg builds all supported architectures. This is great when generating release builds but not so much when testing a release for the current architecture. Not modifying the existing '--mac' arg as to not update our current CI. Reviewed By: antonk52 Differential Revision: D50497211 fbshipit-source-id: 3e4d9728adc822c48788556e2ea47f4dd1c21b05
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fd774a2d52
commit
4834fda6fa
@@ -132,7 +132,12 @@ const argv = yargs
|
|||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
mac: {
|
mac: {
|
||||||
describe: 'Build a platform-specific bundle for MacOS.',
|
describe: 'Build arm64 and x64 bundles for MacOS.',
|
||||||
|
type: 'boolean',
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
'mac-local': {
|
||||||
|
describe: 'Build local architecture bundle for MacOS.',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
@@ -455,6 +460,15 @@ async function buildServerRelease() {
|
|||||||
platforms.push(BuildPlatform.MAC_X64);
|
platforms.push(BuildPlatform.MAC_X64);
|
||||||
platforms.push(BuildPlatform.MAC_AARCH64);
|
platforms.push(BuildPlatform.MAC_AARCH64);
|
||||||
}
|
}
|
||||||
|
if (argv.macLocal) {
|
||||||
|
const architecture = os.arch();
|
||||||
|
console.log(`⚙️ Local architecture: ${architecture}`);
|
||||||
|
if (architecture == 'arm64') {
|
||||||
|
platforms.push(BuildPlatform.MAC_AARCH64);
|
||||||
|
} else {
|
||||||
|
platforms.push(BuildPlatform.MAC_X64);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (argv.win) {
|
if (argv.win) {
|
||||||
platforms.push(BuildPlatform.WINDOWS);
|
platforms.push(BuildPlatform.WINDOWS);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user