mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Revert "[build] Include x-pack example plugins when using example-plugins flag (#120697)" (#125729) (#125733)
This reverts commit3a4c6030b9
. (cherry picked from commit7b4c34e418
) Co-authored-by: Jonathan Budzenski <jon@elastic.co>
This commit is contained in:
parent
fba6713de8
commit
93413ee112
1 changed files with 8 additions and 14 deletions
|
@ -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'],
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue