UNPKG

@best/runner-remote

Version:

Best Runner (Headless)

27 lines 1.03 kB
"use strict"; /* * Copyright (c) 2019, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: MIT * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.createTarBundle = createTarBundle; const path_1 = __importDefault(require("path")); const fs_1 = __importDefault(require("fs")); const tar_1 = require("tar"); // Matches *.tgz files. const tarballRegExp = /\.tgz$/; async function createTarBundle(artifactsFolder, benchmarkName) { return (0, tar_1.c)({ gzip: true, cwd: artifactsFolder, noDirRecurse: true, filter: (p) => !tarballRegExp.test(p), file: path_1.default.resolve(artifactsFolder, `${benchmarkName}.tgz`), }, fs_1.default.readdirSync(artifactsFolder)); } //# sourceMappingURL=create-tar.js.map