diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-07-05 09:43:47 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-07-05 14:27:43 +0200 |
commit | e7a54e7afc21e647adc035b592638c77c8219fe2 (patch) | |
tree | 91146d26c977608a26d42863a4de7339bb7d6d7b /commands | |
parent | aa6b1b9be7c9d7322333893b642aaf8c7a5f2c2e (diff) |
releaser: Add --try flag to ease testing
Diffstat (limited to 'commands')
-rw-r--r-- | commands/release.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/release.go b/commands/release.go index c9275a0f0..74dc7012e 100644 --- a/commands/release.go +++ b/commands/release.go @@ -31,6 +31,7 @@ type releaseCommandeer struct { patchLevel int skipPublish bool + try bool step int } @@ -53,10 +54,11 @@ func createReleaser() *releaseCommandeer { r.cmd.PersistentFlags().IntVarP(&r.patchLevel, "patch", "p", 0, "patch level, defaults to 0 for main releases") r.cmd.PersistentFlags().IntVarP(&r.step, "step", "s", -1, "release step, defaults to -1 for all steps.") 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") return r } func (r *releaseCommandeer) release() error { - return releaser.New(r.patchLevel, r.step, r.skipPublish).Run() + return releaser.New(r.patchLevel, r.step, r.skipPublish, r.try).Run() } |