Skip to content

Commit

Permalink
chore(NA): add missing files to exclude when building bazel prod pack…
Browse files Browse the repository at this point in the history
…ages (#92506)

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

* chore(NA): use globs to support all future run targets
  • Loading branch information
mistic authored and kibanamachine committed Feb 24, 2021
1 parent 740ed96 commit 3a78140
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3a78140

Please sign in to comment.