mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
add es-cache to cleaned folders (#223373)
## Summary Currently, `yarn kbn clean` nor `yarn kbn reset` won't remove cached ES snapshot builds. This might cause issues for developers when switching between branches with major changes. (see: https://elastic.slack.com/archives/C5UDAFZQU/p1749628993034289) This PR adds a softer and a harder clean to `clean` and `reset` respectively.
This commit is contained in:
parent
8577ff35fa
commit
20764b6914
2 changed files with 7 additions and 1 deletions
|
@ -11,6 +11,8 @@ import { dedent } from '../lib/indent.mjs';
|
||||||
import { cleanPaths } from '../lib/clean.mjs';
|
import { cleanPaths } from '../lib/clean.mjs';
|
||||||
import * as Bazel from '../lib/bazel.mjs';
|
import * as Bazel from '../lib/bazel.mjs';
|
||||||
import { findPluginCleanPaths } from '../lib/find_clean_paths.mjs';
|
import { findPluginCleanPaths } from '../lib/find_clean_paths.mjs';
|
||||||
|
import Path from 'path';
|
||||||
|
import { REPO_ROOT } from '../lib/paths.mjs';
|
||||||
|
|
||||||
/** @type {import('../lib/command').Command} */
|
/** @type {import('../lib/command').Command} */
|
||||||
export const command = {
|
export const command = {
|
||||||
|
@ -33,7 +35,10 @@ export const command = {
|
||||||
you might need to run 'yarn kbn reset'.
|
you might need to run 'yarn kbn reset'.
|
||||||
`);
|
`);
|
||||||
|
|
||||||
await cleanPaths(log, await findPluginCleanPaths(log));
|
await cleanPaths(log, [
|
||||||
|
...(await findPluginCleanPaths(log)),
|
||||||
|
Path.resolve(REPO_ROOT, '.es', 'cache'),
|
||||||
|
]);
|
||||||
|
|
||||||
// Runs Bazel soft clean
|
// Runs Bazel soft clean
|
||||||
if (await Bazel.isInstalled(log)) {
|
if (await Bazel.isInstalled(log)) {
|
||||||
|
|
|
@ -38,6 +38,7 @@ export const command = {
|
||||||
Path.resolve(REPO_ROOT, 'node_modules'),
|
Path.resolve(REPO_ROOT, 'node_modules'),
|
||||||
Path.resolve(REPO_ROOT, 'x-pack/node_modules'),
|
Path.resolve(REPO_ROOT, 'x-pack/node_modules'),
|
||||||
Path.resolve(REPO_ROOT, 'data'),
|
Path.resolve(REPO_ROOT, 'data'),
|
||||||
|
Path.resolve(REPO_ROOT, '.es'),
|
||||||
...readCleanPatterns(REPO_ROOT),
|
...readCleanPatterns(REPO_ROOT),
|
||||||
...(await findPluginCleanPaths(log)),
|
...(await findPluginCleanPaths(log)),
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue