Skip to content

Commit

Permalink
release: disable promotion of development release & add --development…
Browse files Browse the repository at this point in the history
… flag to baseFlags (#62336)

(cherry picked from commit 90b797b)
  • Loading branch information
BolajiOlajide authored and github-actions[bot] committed May 6, 2024
1 parent 5d7bfad commit 57cd03f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
10 changes: 10 additions & 0 deletions dev/sg/internal/release/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ func (r *releaseRunner) Test(ctx context.Context) error {
}

func (r *releaseRunner) Promote(ctx context.Context) error {
if r.isDevelopment {
announce2("promote", "Skipping promote, this is a development release")
return nil
}

if err := r.checkRequirements(ctx, stagePromoteCreate); err != nil {
return err
}
Expand All @@ -363,6 +368,11 @@ func (r *releaseRunner) Promote(ctx context.Context) error {
}

func (r *releaseRunner) PromoteFinalize(ctx context.Context) error {
if r.isDevelopment {
announce2("promote", "Skipping promote finalize, this is a development release")
return nil
}

if err := r.checkRequirements(ctx, stagePromoteFinalize); err != nil {
return err
}
Expand Down
10 changes: 5 additions & 5 deletions dev/sg/internal/release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ var releaseBaseFlags = []cli.Flag{
Value: false,
Usage: "Infer run configuration from last commit instead of flags.",
},
&cli.BoolFlag{
Name: "development",
Aliases: []string{"d"},
Usage: "Create a development release. This is a release that is not meant to be promoted to public, but is meant to be used by other developers to test their changes. It is not meant to be used by customers.",
},
}

// releaseRunFlags are the flags for the release run * subcommands. Version is optional here, because
Expand All @@ -69,11 +74,6 @@ var releaseCreatePromoteFlags = append(releaseBaseFlags, []cli.Flag{
Usage: "Force version (required)",
Required: true,
},
&cli.BoolFlag{
Name: "development",
Aliases: []string{"d"},
Usage: "Create a development release. This is a release that is not meant to be promoted to public, but is meant to be used by other developers to test their changes. It is not meant to be used by customers.",
},
}...)

var Command = &cli.Command{
Expand Down

0 comments on commit 57cd03f

Please sign in to comment.