Skip to content

Commit

Permalink
SKA: Relocate script 6.1 (#205086)
Browse files Browse the repository at this point in the history
## Summary

* Exclude example modules from relocation.
* Add an extra path transform to simplify packages folders.
  • Loading branch information
gsoldevila authored Dec 23, 2024
1 parent 1df66ad commit 19f24b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/kbn-relocate/relocate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ const findModules = ({ teams, paths, included, excluded }: FindModulesParams, lo
.filter(({ manifest }) => !manifest.devOnly)
// explicit exclusions
.filter(({ id }) => !EXCLUDED_MODULES.includes(id) && !excluded.includes(id))
// we don't want to move test modules (just yet)
// we don't want to move test and example modules (just yet)
.filter(
({ directory }) =>
!directory.includes(`/${KIBANA_FOLDER}/test/`) &&
!directory.includes(`/${KIBANA_FOLDER}/x-pack/test/`)
!directory.includes(`/${KIBANA_FOLDER}/x-pack/test/`) &&
!directory.includes(`/${KIBANA_FOLDER}/examples/`) &&
!directory.includes(`/${KIBANA_FOLDER}/x-pack/examples/`)
)
// the module is under the umbrella specified by the user
.filter(
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-relocate/utils/transforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const TRANSFORMS: Record<string, string | TransformFunction> = {
'x-pack/solutions/security/packages/security-solution/': 'x-pack/solutions/security/packages/',
'x-pack/solutions/observability/plugins/observability_solution/':
'x-pack/solutions/observability/plugins/',
'x-pack/solutions/observability/packages/observability/observability_utils/observability_':
'x-pack/solutions/observability/packages/',
'x-pack/solutions/observability/packages/observability/':
'x-pack/solutions/observability/packages/',
'src/core/packages/core/': (path: string) => {
Expand Down

0 comments on commit 19f24b3

Please sign in to comment.