diff --git a/.github/workflows/releaser.yaml b/.github/workflows/releaser.yaml index 5ab76f9..81939f2 100644 --- a/.github/workflows/releaser.yaml +++ b/.github/workflows/releaser.yaml @@ -168,7 +168,7 @@ jobs: --head ${{ steps.create_branch.outputs.branch_name }} \ --title "Release ${{ steps.new_version.outputs.new_tag }}" \ --body "Automated release PR for ${{ steps.new_version.outputs.new_tag }}" \ - --reviewer mousamdahal || echo "PR creation failed, possibly no changes or reviewer issue" + --reviewer sarosejoshi || echo "PR creation failed, possibly no changes or reviewer issue" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/cmd/root/root.go b/cmd/root/root.go index 1742c14..ab8ae59 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -27,6 +27,7 @@ type RootDependencies struct { RDSService rds.RDSServiceInterface EKSService eks.EKSServiceInterface ECRService ecr.ECRServiceInterface + Version string } func NewRootCmd(deps RootDependencies) *cobra.Command { @@ -37,7 +38,9 @@ func NewRootCmd(deps RootDependencies) *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { return cmd.Help() }, + Version: deps.Version, } + rootCmd.SetVersionTemplate(`{{printf "%s version %s\n" .Name .Version}}`) rootCmd.AddCommand(cmdSSO.NewSSOCommands(cmdSSO.SSODependencies{ SetupClient: deps.SSOSetupClient, diff --git a/main.go b/main.go index 21d375a..35afb96 100644 --- a/main.go +++ b/main.go @@ -21,6 +21,8 @@ import ( "github.com/aws/aws-sdk-go-v2/service/ssm" ) +var Version = "0.2.0" + func main() { ssoSetupClient, err := sso.NewSSOClient(sso.NewPrompter(), &common.RealCommandExecutor{}) @@ -95,6 +97,7 @@ func main() { RDSService: rdsSvc, EKSService: eksSvc, ECRService: ecrSvc, + Version: Version, }) if err := rootCmd.Execute(); err != nil { os.Exit(1)