Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: disable promotion of development release & add --development flag to baseFlags #62336

Merged
merged 3 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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