Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

### Enhancements:

- docs(compute): for `compute deploy` and `compute publish`, the `--version` help now says that the flag is optional and
defaults to the active version, or to the latest version if none is active.

### Dependencies:
- build(deps): `github.com/andybalholm/brotli` from 1.2.3 to 1.2.4 ([#1913](https://github.com/fastly/cli/pull/1913))
- build(deps): `github.com/mattn/go-runewidth` from 0.0.29 to 0.0.30 ([#1913](https://github.com/fastly/cli/pull/1913))
Expand Down
4 changes: 4 additions & 0 deletions pkg/argparser/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ var (
FlagVersionName = "version"
// FlagVersionDesc is the flag description.
FlagVersionDesc = "'latest', 'active', 'staged', or the number of a specific Fastly service version"
// FlagVersionOptionalDesc is the flag description for commands where the
// version flag is optional. It describes what OptionalServiceVersion.Parse
// does when the flag is omitted.
FlagVersionOptionalDesc = FlagVersionDesc + " (default: the active version, or the latest version if none is active)"
)

// PaginationDirection is a list of directions the page results can be displayed.
Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/compute/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func NewDeployCommand(parent argparser.Registerer, g *global.Data) *DeployComman
})
c.RegisterFlag(argparser.StringFlagOpts{
Action: c.ServiceVersion.Set,
Description: argparser.FlagVersionDesc,
Description: argparser.FlagVersionOptionalDesc,
Dst: &c.ServiceVersion.Value,
Name: argparser.FlagVersionName,
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/compute/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func NewPublishCommand(parent argparser.Registerer, g *global.Data, build *Build
c.CmdClause.Flag("status-check-timeout", "Set a timeout (in seconds) for the service availability check").Default("120").IntVar(&c.statusCheckTimeout)
c.RegisterFlag(argparser.StringFlagOpts{
Name: argparser.FlagVersionName,
Description: argparser.FlagVersionDesc,
Description: argparser.FlagVersionOptionalDesc,
Dst: &c.serviceVersion.Value,
Action: c.serviceVersion.Set,
})
Expand Down
Loading