diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-08-05 16:35:24 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-08-28 18:23:01 +0200 |
commit | 45e1084ff2d47efe0ae83a984a8723abd135ca48 (patch) | |
tree | c226bd12ff7af7a6414dc52fae4a66106792ad8e /commands/release.go | |
parent | c98348416cfa90026ef8fba93d6c0babe0f41d52 (diff) |
Add linux/arm64 extended to release setup
Fixes #8257
Diffstat (limited to 'commands/release.go')
-rw-r--r-- | commands/release.go | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/commands/release.go b/commands/release.go index 6decda9ea..2072f3eb2 100644 --- a/commands/release.go +++ b/commands/release.go @@ -17,8 +17,6 @@ package commands import ( - "errors" - "github.com/gohugoio/hugo/config" "github.com/gohugoio/hugo/releaser" "github.com/spf13/cobra" @@ -29,10 +27,9 @@ var _ cmder = (*releaseCommandeer)(nil) type releaseCommandeer struct { cmd *cobra.Command - version string - - skipPublish bool - try bool + step int + skipPush bool + try bool } func createReleaser() cmder { @@ -50,9 +47,9 @@ func createReleaser() cmder { return r.release() } - r.cmd.PersistentFlags().StringVarP(&r.version, "rel", "r", "", "new release version, i.e. 0.25.1") - r.cmd.PersistentFlags().BoolVarP(&r.skipPublish, "skip-publish", "", false, "skip all publishing pipes of the release") - r.cmd.PersistentFlags().BoolVarP(&r.try, "try", "", false, "simulate a release, i.e. no changes") + r.cmd.PersistentFlags().BoolVarP(&r.skipPush, "skip-push", "", false, "skip pushing to remote") + r.cmd.PersistentFlags().BoolVarP(&r.try, "try", "", false, "no changes") + r.cmd.PersistentFlags().IntVarP(&r.step, "step", "", 0, "step to run (1: set new version 2: prepare next dev version)") return r } @@ -65,8 +62,10 @@ func (c *releaseCommandeer) flagsToConfig(cfg config.Provider) { } func (r *releaseCommandeer) release() error { - if r.version == "" { - return errors.New("must set the --rel flag to the relevant version number") + rel, err := releaser.New(r.skipPush, r.try, r.step) + if err != nil { + return err } - return releaser.New(r.version, r.skipPublish, r.try).Run() + + return rel.Run() } |