forked from mirrors/gecko-dev
This build artifact is only built on platforms that don't use cross compilation, because the result of the build is used to generate the artifact. This means the process doesn't work on at least OSX. Normandy capabilities do not currently vary by platform, so it is reasonable to not have this on every platform. Differential Revision: https://phabricator.services.mozilla.com/D57848 --HG-- extra : moz-landing-system : lando
31 lines
802 B
JavaScript
31 lines
802 B
JavaScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
/* eslint-env xpcshell */
|
|
/* globals print, quit, arguments */
|
|
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
|
const { RecipeRunner } = ChromeUtils.import(
|
|
"resource://normandy/lib/RecipeRunner.jsm"
|
|
);
|
|
|
|
if (arguments.length !== 1) {
|
|
print("Usage: capabilities-script.js OUTFILE");
|
|
quit(1);
|
|
}
|
|
|
|
main(...arguments);
|
|
|
|
async function main(outPath) {
|
|
const capabililitySet = RecipeRunner.getCapabilities();
|
|
await OS.File.writeAtomic(
|
|
outPath,
|
|
JSON.stringify(
|
|
{
|
|
capabilities: Array.from(capabililitySet),
|
|
},
|
|
null,
|
|
4
|
|
)
|
|
);
|
|
}
|