diff --git a/tools/commands-packages.js b/tools/commands-packages.js index 4604f7b76c..13eb8505e5 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -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(', '));