Skip to content
Permalink
Browse files

change default prune retention to 30 versions

you can actually remove them all from s3 and it does nothing, Lambda copies
them internally to its own storage
  • Loading branch information...
tj committed May 4, 2018
1 parent 55d6d06 commit f3f8c4ce581ea4861079873007d295e8fe4832f2
Showing with 6 additions and 6 deletions.
  1. +3 −3 docs/06-commands.md
  2. +3 −3 internal/cli/prune/prune.go
@@ -825,18 +825,18 @@ Flags:
--format="text" Output formatter.
--version Show application version.
-s, --stage="staging" Target stage name.
-r, --retain=60 Number of versions to retain.
-r, --retain=30 Number of versions to retain.
```

### Examples

Prune and retain the most recent 15 staging versions.
Prune and retain the most recent 30 staging versions.

```
$ up prune
```

Prune and retain the most recent 60 production versions.
Prune and retain the most recent 30 production versions.

```
$ up prune -s production
@@ -11,12 +11,12 @@ import (
func init() {
cmd := root.Command("prune", "Prune old S3 deployments of a stage.")

cmd.Example(`up prune`, "Prune and retain the most recent 15 staging versions.")
cmd.Example(`up prune -s production`, "Prune and retain the most recent 60 production versions.")
cmd.Example(`up prune`, "Prune and retain the most recent 30 staging versions.")
cmd.Example(`up prune -s production`, "Prune and retain the most recent 30 production versions.")
cmd.Example(`up prune -s production -r 15`, "Prune and retain the most recent 15 production versions.")

stage := cmd.Flag("stage", "Target stage name.").Short('s').Default("staging").String()
versions := cmd.Flag("retain", "Number of versions to retain.").Short('r').Default("60").Int()
versions := cmd.Flag("retain", "Number of versions to retain.").Short('r').Default("30").Int()

cmd.Action(func(_ *kingpin.ParseContext) error {
c, p, err := root.Init()

0 comments on commit f3f8c4c

Please sign in to comment.
You can’t perform that action at this time.