Skip to content

Commit

Permalink
Mark --eksGoReleases required for eksGoRelease (#1389)
Browse files Browse the repository at this point in the history
  • Loading branch information
wongma7 authored Apr 4, 2024
1 parent 9e020f6 commit 377f2ca
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tools/eksDistroBuildToolingOpsTools/cmd/eksGoRelease/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (

const (
eksGoReleasesFlag = "eksGoReleases"
dryrunFlag = "dryrun"
userFlag = "user"
emailFlag = "email"
dryrunFlag = "dryrun"
userFlag = "user"
emailFlag = "email"
)

var (
Expand All @@ -30,9 +30,12 @@ var (
func init() {
rootCmd.PersistentFlags().IntP("verbosity", "v", 0, "Set the log level verbosity")
rootCmd.PersistentFlags().StringSlice(eksGoReleasesFlag, []string{}, "EKS Go releases to update")
rootCmd.PersistentFlags().BoolP(dryrunFlag, "d", false, "run without creating PR")
rootCmd.PersistentFlags().StringP(emailFlag, "e", "", "github email for git functions")
rootCmd.PersistentFlags().StringP(userFlag, "u", "", "github username for git functions")
if err := rootCmd.MarkPersistentFlagRequired(eksGoReleasesFlag); err != nil {
log.Fatal(err)
}
rootCmd.PersistentFlags().BoolP(dryrunFlag, "d", false, "run without creating PR")
rootCmd.PersistentFlags().StringP(emailFlag, "e", "", "github email for git functions")
rootCmd.PersistentFlags().StringP(userFlag, "u", "", "github username for git functions")

// Bind config flags to viper
if err := viper.BindPFlags(rootCmd.PersistentFlags()); err != nil {
Expand Down

0 comments on commit 377f2ca

Please sign in to comment.