chore(NA): add missing files to exclude when building bazel prod packages (#92506)

* chore(NA): add missing bazel files to exclude when building prod bazel packages

* chore(NA): use globs to support all future run targets
This commit is contained in:
Tiago Costa 2021-02-24 02:05:38 +00:00 committed by GitHub
parent 048425daa0
commit ae6a18da32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -59868,7 +59868,7 @@ async function copyToBuild(project, kibanaRoot, buildRoot) {
// We want the package to have the same relative location within the build
const relativeProjectPath = Object(path__WEBPACK_IMPORTED_MODULE_2__["relative"])(kibanaRoot, project.path);
const buildProjectPath = Object(path__WEBPACK_IMPORTED_MODULE_2__["resolve"])(buildRoot, relativeProjectPath);
const bazelFilesToExclude = ['!*.params', '!*_mappings.json', '!*_options.optionsvalid.d.ts'];
const bazelFilesToExclude = ['!*.sh.runfiles*', '!*.params', '!*_mappings.json', '!*_options.optionsvalid.d.ts', '!*_loader.js', '!*_require_patch.js', '!*.sh'];
await cpy__WEBPACK_IMPORTED_MODULE_0___default()(['**/*', '!node_modules/**', ...bazelFilesToExclude], buildProjectPath, {
cwd: Object(path__WEBPACK_IMPORTED_MODULE_2__["join"])(kibanaRoot, 'bazel', 'bin', 'packages', Object(path__WEBPACK_IMPORTED_MODULE_2__["basename"])(buildProjectPath)),
dot: true,

View file

@ -60,8 +60,16 @@ async function copyToBuild(project: Project, kibanaRoot: string, buildRoot: stri
// We want the package to have the same relative location within the build
const relativeProjectPath = relative(kibanaRoot, project.path);
const buildProjectPath = resolve(buildRoot, relativeProjectPath);
const bazelFilesToExclude = [
'!*.sh.runfiles*',
'!*.params',
'!*_mappings.json',
'!*_options.optionsvalid.d.ts',
'!*_loader.js',
'!*_require_patch.js',
'!*.sh',
];
const bazelFilesToExclude = ['!*.params', '!*_mappings.json', '!*_options.optionsvalid.d.ts'];
await copy(['**/*', '!node_modules/**', ...bazelFilesToExclude], buildProjectPath, {
cwd: join(kibanaRoot, 'bazel', 'bin', 'packages', basename(buildProjectPath)),
dot: true,