Skip to content

Commit

Permalink
SUP-2009 | Fix build commands (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcncl authored Apr 18, 2024
1 parent 02af294 commit b432246
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion pkg/cmd/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func NewCmdBuild(f *factory.Factory) *cobra.Command {
A pipeline is passed as an argument. It can be supplied in any of the following formats:
- "PIPELINE_SLUG"
- "ORGANIZATION_SLUG/PIPELINE_SLUG"
- by URL, e.g. "https://buildkite.com/buildkite/buildkite-cli"
`),
},
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/build/cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ func NewCmdBuildCancel(f *factory.Factory) *cobra.Command {
Cancels the specified build.
It accepts a build number and a pipeline slug as an argument.
The pipeline can be a {pipeline_slug}, {org_slug}/{pipeline_slug} or a full URL to the pipeline.
The pipeline can be a {pipeline_slug} or in the format {org_slug}/{pipeline_slug}.
`),
RunE: func(cmd *cobra.Command, args []string) error {
buildId := args[0]
resolvers := pipeline.NewAggregateResolver(pipelineResolverPositionArg(args, f.Config))
resolvers := pipeline.NewAggregateResolver(pipelineResolverPositionArg(args[1:], f.Config))
pipeline, err := resolvers.Resolve()
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/build/rebuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ func NewCmdBuildRebuild(f *factory.Factory) *cobra.Command {
Runs a new build from the specified build number and pipeline and outputs the URL to the new build.
It accepts a build number and a pipeline slug as an argument.
The pipeline can be a {pipeline_slug}, {org_slug}/{pipeline_slug} or a full URL to the pipeline.
The pipeline can be a {pipeline_slug} or in the format {org_slug}/{pipeline_slug}.
`),
RunE: func(cmd *cobra.Command, args []string) error {
buildId := args[0]
resolvers := pipeline.NewAggregateResolver(pipelineResolverPositionArg(args, f.Config))
resolvers := pipeline.NewAggregateResolver(pipelineResolverPositionArg(args[1:], f.Config))
pipeline, err := resolvers.Resolve()
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/build/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ func NewCmdBuildView(f *factory.Factory) *cobra.Command {
View a build's information.
It accepts a build number and a pipeline slug as an argument.
The pipeline can be a {pipeline_slug}, {org_slug}/{pipeline_slug} or a full URL to the pipeline.
The pipeline can be a {pipeline_slug} or in the format {org_slug}/{pipeline_slug}.
`),
RunE: func(cmd *cobra.Command, args []string) error {
buildId := args[0]
resolvers := pipeline.NewAggregateResolver(pipelineResolverPositionArg(args, f.Config))
resolvers := pipeline.NewAggregateResolver(pipelineResolverPositionArg(args[1:], f.Config))
pipeline, err := resolvers.Resolve()
if err != nil {
return err
Expand Down

0 comments on commit b432246

Please sign in to comment.