Add an option to build a bootstrap tarball just for one arch

This commit is contained in:
Slava Kim
2015-02-04 15:21:06 -08:00
parent f2dd0e8c35
commit c70632af6b

View File

@@ -2027,7 +2027,9 @@ main.registerCommand({
options: {
// Copy the tarball contents to the output directory instead of making a
// tarball (useful for testing the release process)
"unpacked": { type: Boolean, required: false }
"unpacked": { type: Boolean, required: false },
// Build a tarball only for a specific arch
"target-arch": { type: String, required: false }
},
// In this function, we want to use the official catalog everywhere, because
@@ -2086,6 +2088,19 @@ main.registerCommand({
return osArches[0];
});
if (options['target-arch']) {
// check if the passed arch is in the list
var arch = options['target-arch'];
if (! _.contains(osArches, arch)) {
throw new Error(
arch + ": the arch is not available for the release. Available arches: "
+ osArches.join(', '));
}
// build only for the selected arch
osArches = [arch];
}
Console.error(
'Building bootstrap tarballs for architectures ' + osArches.join(', '));