Skip to content

Commit caaff9a

Browse files
committed
lint and build docs
1 parent 8189930 commit caaff9a

File tree

12 files changed

+75
-11
lines changed

12 files changed

+75
-11
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,24 @@ Use this command to export ingest pipelines with referenced pipelines from the E
366366

367367
Use this command to download selected ingest pipelines and its referenced processor pipelines from Elasticsearch. Select data stream or the package root directories to download the pipelines. Pipelines are downloaded as is and will need adjustment to meet your package needs.
368368

369+
### `elastic-package filter [flags]`
370+
371+
_Context: package_
372+
373+
This command gives you a list of all packages based on the given query
374+
375+
### `elastic-package foreach [flags] -- <SUBCOMMAND>`
376+
377+
_Context: package_
378+
379+
Execute a command for each package matching the given filter criteria.
380+
381+
This command combines filtering capabilities with command execution, allowing you to run
382+
any elastic-package subcommand across multiple packages in a single operation.
383+
384+
The command uses the same filter flags as the 'filter' command to select packages,
385+
then executes the specified subcommand for each matched package.
386+
369387
### `elastic-package format`
370388

371389
_Context: package_

cmd/filter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ import (
1111
"os"
1212
"slices"
1313

14+
"github.com/spf13/cobra"
15+
1416
"github.com/elastic/elastic-package/internal/cobraext"
1517
"github.com/elastic/elastic-package/internal/filter"
1618
"github.com/elastic/elastic-package/internal/packages"
17-
"github.com/spf13/cobra"
1819
)
1920

2021
const filterLongDescription = `This command gives you a list of all packages based on the given query`

cmd/foreach.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ import (
1414
"strings"
1515
"sync"
1616

17+
"github.com/spf13/cobra"
18+
1719
"github.com/elastic/elastic-package/internal/cobraext"
1820
"github.com/elastic/elastic-package/internal/filter"
1921
"github.com/elastic/elastic-package/internal/logger"
2022
"github.com/elastic/elastic-package/internal/multierror"
2123
"github.com/elastic/elastic-package/internal/packages"
22-
"github.com/spf13/cobra"
2324
)
2425

2526
const foreachLongDescription = `Execute a command for each package matching the given filter criteria.

internal/filter/category_flag.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
// or more contributor license agreements. Licensed under the Elastic License;
3+
// you may not use this file except in compliance with the Elastic License.
4+
15
package filter
26

37
import (
8+
"github.com/spf13/cobra"
9+
410
"github.com/elastic/elastic-package/internal/cobraext"
511
"github.com/elastic/elastic-package/internal/packages"
6-
"github.com/spf13/cobra"
712
)
813

914
type CategoryFlag struct {

internal/filter/codeowner_flag.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
// or more contributor license agreements. Licensed under the Elastic License;
3+
// you may not use this file except in compliance with the Elastic License.
4+
15
package filter
26

37
import (
48
"fmt"
59

10+
"github.com/spf13/cobra"
11+
612
"github.com/elastic/elastic-package/internal/cobraext"
713
"github.com/elastic/elastic-package/internal/packages"
814
"github.com/elastic/elastic-package/internal/tui"
9-
"github.com/spf13/cobra"
1015
)
1116

1217
type CodeOwnerFlag struct {

internal/filter/input_flag.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
// or more contributor license agreements. Licensed under the Elastic License;
3+
// you may not use this file except in compliance with the Elastic License.
4+
15
package filter
26

37
import (
8+
"github.com/spf13/cobra"
9+
410
"github.com/elastic/elastic-package/internal/cobraext"
511
"github.com/elastic/elastic-package/internal/packages"
6-
"github.com/spf13/cobra"
712
)
813

914
type InputFlag struct {

internal/filter/integrationtype_flag.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
// or more contributor license agreements. Licensed under the Elastic License;
3+
// you may not use this file except in compliance with the Elastic License.
4+
15
package filter
26

37
import (
8+
"github.com/spf13/cobra"
9+
410
"github.com/elastic/elastic-package/internal/cobraext"
511
"github.com/elastic/elastic-package/internal/packages"
6-
"github.com/spf13/cobra"
712
)
813

914
type IntegrationTypeFlag struct {

internal/filter/packagename_flag.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
// or more contributor license agreements. Licensed under the Elastic License;
3+
// you may not use this file except in compliance with the Elastic License.
4+
15
package filter
26

37
import (
48
"fmt"
59

6-
"github.com/elastic/elastic-package/internal/cobraext"
7-
"github.com/elastic/elastic-package/internal/packages"
810
"github.com/gobwas/glob"
911
"github.com/spf13/cobra"
12+
13+
"github.com/elastic/elastic-package/internal/cobraext"
14+
"github.com/elastic/elastic-package/internal/packages"
1015
)
1116

1217
type PackageNameFlag struct {

internal/filter/registry.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
// or more contributor license agreements. Licensed under the Elastic License;
3+
// you may not use this file except in compliance with the Elastic License.
4+
15
package filter
26

37
import (
48
"fmt"
59

10+
"github.com/spf13/cobra"
11+
612
"github.com/elastic/elastic-package/internal/logger"
713
"github.com/elastic/elastic-package/internal/multierror"
814
"github.com/elastic/elastic-package/internal/packages"
9-
"github.com/spf13/cobra"
1015
)
1116

1217
var registry = []Filter{

internal/filter/specversion_flag.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
// or more contributor license agreements. Licensed under the Elastic License;
3+
// you may not use this file except in compliance with the Elastic License.
4+
15
package filter
26

37
import (
48
"fmt"
59

610
"github.com/Masterminds/semver/v3"
11+
"github.com/spf13/cobra"
12+
713
"github.com/elastic/elastic-package/internal/cobraext"
814
"github.com/elastic/elastic-package/internal/packages"
9-
"github.com/spf13/cobra"
1015
)
1116

1217
type SpecVersionFlag struct {

0 commit comments

Comments
 (0)