Revert "[build] Include x-pack example plugins when using example-plugins flag (#120697)" (#125729)

This reverts commit 3a4c6030b9.
This commit is contained in:
Jonathan Budzenski 2022-02-15 16:40:09 -06:00 committed by GitHub
parent d946361eaf
commit 7b4c34e418
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,23 +13,17 @@ import { exec, mkdirp, copyAll, Task } from '../lib';
export const BuildKibanaExamplePlugins: Task = {
description: 'Building distributable versions of Kibana example plugins',
async run(config, log) {
async run(config, log, build) {
const examplesDir = Path.resolve(REPO_ROOT, 'examples');
const args = [
Path.resolve(REPO_ROOT, 'scripts/plugin_helpers'),
'../../scripts/plugin_helpers',
'build',
`--kibana-version=${config.getBuildVersion()}`,
];
const getExampleFolders = (dir: string) => {
return Fs.readdirSync(dir, { withFileTypes: true })
.filter((f) => f.isDirectory())
.map((f) => Path.resolve(dir, f.name));
};
const folders = [
...getExampleFolders(Path.resolve(REPO_ROOT, 'examples')),
...getExampleFolders(Path.resolve(REPO_ROOT, 'x-pack/examples')),
];
const folders = Fs.readdirSync(examplesDir, { withFileTypes: true })
.filter((f) => f.isDirectory())
.map((f) => Path.resolve(REPO_ROOT, 'examples', f.name));
for (const examplePlugin of folders) {
try {
@ -46,8 +40,8 @@ export const BuildKibanaExamplePlugins: Task = {
const pluginsDir = config.resolveFromTarget('example_plugins');
await mkdirp(pluginsDir);
await copyAll(REPO_ROOT, pluginsDir, {
select: ['examples/*/build/*.zip', 'x-pack/examples/*/build/*.zip'],
await copyAll(examplesDir, pluginsDir, {
select: ['*/build/*.zip'],
});
},
};