From 3a78140ab10b61ba73ff59eaa2e18caccb14d2f3 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 24 Feb 2021 02:05:38 +0000 Subject: [PATCH] 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 --- packages/kbn-pm/dist/index.js | 2 +- .../src/production/build_bazel_production_projects.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index 1b8bd4784e5833..51e8a617e24469 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -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, diff --git a/packages/kbn-pm/src/production/build_bazel_production_projects.ts b/packages/kbn-pm/src/production/build_bazel_production_projects.ts index a54d6c753d8d77..1034253c5e0dc3 100644 --- a/packages/kbn-pm/src/production/build_bazel_production_projects.ts +++ b/packages/kbn-pm/src/production/build_bazel_production_projects.ts @@ -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,