From c70632af6b92d38d773fbcad26d11e508ab940dd Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 4 Feb 2015 15:21:06 -0800 Subject: [PATCH] Add an option to build a bootstrap tarball just for one arch --- tools/commands-packages.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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(', '));