Skip to content

Commit

Permalink
feat: group comamnds (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisuhag authored Sep 24, 2023
1 parent be1edd7 commit d564772
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 24 deletions.
36 changes: 26 additions & 10 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@ project_name: meteor

release:
prerelease: auto
draft: true

before:
hooks:
- go mod tidy
- make clean

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^build:"

builds:
- main: ./main.go
id: "linux"
Expand Down Expand Up @@ -59,14 +66,6 @@ checksum:
snapshot:
name_template: "{{ .Tag }}-next"

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^build:"

dockers:
- goos: linux
goarch: amd64
Expand All @@ -78,6 +77,24 @@ dockers:
- "docker.io/raystack/{{.ProjectName}}:{{ .Version }}"
- "docker.io/raystack/{{.ProjectName}}:{{ .Version }}-amd64"

nfpms:
- maintainer: Raystack
description: "Metadata collection tool."
homepage: https://github.com/raystack/meteor
license: Apache 2.0
formats:
- deb
- rpm
- apk

scoops:
- homepage: "https://github.com/raystack/meteor"
description: "Metadata collection tool."
license: Apache 2.0
bucket:
owner: raystack
name: scoop-bucket

brews:
- name: meteor
homepage: "https://github.com/raystack/meteor"
Expand All @@ -87,7 +104,6 @@ brews:
name: homebrew-tap
license: "Apache 2.0"
folder: Formula

dependencies:
- name: git
install: |-
Expand Down
2 changes: 1 addition & 1 deletion cmd/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func GenCmd() *cobra.Command {
$ meteor gen my-template.yaml -o ./output-dir -d ./data.yaml
`),
Annotations: map[string]string{
"group:core": "true",
"group": "core",
},
RunE: func(cmd *cobra.Command, args []string) error {
templatePath := args[0]
Expand Down
8 changes: 4 additions & 4 deletions cmd/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func InfoCmd() *cobra.Command {
Use: "info <command>",
Short: "Display plugin information",
Annotations: map[string]string{
"group:core": "true",
"group": "core",
},
}
cmd.AddCommand(InfoSinkCmd())
Expand All @@ -41,7 +41,7 @@ func InfoSinkCmd() *cobra.Command {
`),
Args: cobra.MaximumNArgs(1),
Annotations: map[string]string{
"group:core": "true",
"group": "core",
},
RunE: func(cmd *cobra.Command, args []string) error {
var sinks []string
Expand Down Expand Up @@ -86,7 +86,7 @@ func InfoExtCmd() *cobra.Command {
`),
Args: cobra.MaximumNArgs(1),
Annotations: map[string]string{
"group:core": "true",
"group": "core",
},
RunE: func(cmd *cobra.Command, args []string) error {
var extractors []string
Expand Down Expand Up @@ -130,7 +130,7 @@ func InfoProccCmd() *cobra.Command {
`),
Args: cobra.MaximumNArgs(1),
Annotations: map[string]string{
"group:core": "true",
"group": "core",
},
RunE: func(cmd *cobra.Command, args []string) error {
var processors []string
Expand Down
2 changes: 1 addition & 1 deletion cmd/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func LintCmd() *cobra.Command {
$ meteor lint .
`),
Annotations: map[string]string{
"group:core": "true",
"group": "core",
},
RunE: func(cmd *cobra.Command, args []string) error {
cfg, err := config.Load("./meteor.yaml")
Expand Down
8 changes: 4 additions & 4 deletions cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func ListCmd() *cobra.Command {
Use: "list <command>",
Short: "List available plugins",
Annotations: map[string]string{
"group:core": "true",
"group": "core",
},
}
cmd.AddCommand(ListExtCmd())
Expand Down Expand Up @@ -49,7 +49,7 @@ func ListExtCmd() *cobra.Command {
$ meteor list e
`),
Annotations: map[string]string{
"group:core": "true",
"group": "core",
},
Run: func(cmd *cobra.Command, args []string) {
extractors := registry.Extractors.List()
Expand Down Expand Up @@ -89,7 +89,7 @@ func ListSinksCmd() *cobra.Command {
$ meteor list s
`),
Annotations: map[string]string{
"group:core": "true",
"group": "core",
},
Run: func(cmd *cobra.Command, args []string) {
sinks := registry.Sinks.List()
Expand Down Expand Up @@ -128,7 +128,7 @@ func ListProccCmd() *cobra.Command {
$ meteor list p
`),
Annotations: map[string]string{
"group:core": "true",
"group": "core",
},
Run: func(cmd *cobra.Command, args []string) {
processors := registry.Processors.List()
Expand Down
4 changes: 2 additions & 2 deletions cmd/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func NewCmd() *cobra.Command {
Use: "new",
Short: "Bootstrap new recipes",
Annotations: map[string]string{
"group:core": "true",
"group": "core",
},
}

Expand Down Expand Up @@ -58,7 +58,7 @@ func NewRecipeCmd() *cobra.Command {
$ meteor new recipe sample -e bigquery -s compass > recipe.yaml
`),
Annotations: map[string]string{
"group:core": "true",
"group": "core",
},
RunE: func(cmd *cobra.Command, args []string) error {
var sinkList []string
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func New() *cobra.Command {
$ meteor gen recipe --extractor=date --sink console
`),
Annotations: map[string]string{
"group:core": "true",
"group": "core",
"help:learn": heredoc.Doc(`
Use 'meteor <command> <subcommand> --help' for more information about a command.
Read the manual at https://raystack.github.io/meteor/
Expand Down
2 changes: 1 addition & 1 deletion cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func RunCmd() *cobra.Command {
`),
Args: cobra.ExactArgs(1),
Annotations: map[string]string{
"group:core": "true",
"group": "core",
},
RunE: func(cmd *cobra.Command, args []string) error {
cfg, err := config.Load(configFile)
Expand Down

0 comments on commit d564772

Please sign in to comment.