mirror of
https://github.com/docker/compose.git
synced 2026-10-09 13:40:37 +00:00
Separate compose CLI plugin version from Cloud integration version
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
parent
8d86f578ed
commit
28bd7bda3e
4 changed files with 9 additions and 6 deletions
|
|
@ -34,9 +34,10 @@ type versionOptions struct {
|
|||
func versionCommand() *cobra.Command {
|
||||
opts := versionOptions{}
|
||||
cmd := &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Show the Docker Compose version information",
|
||||
Args: cobra.MaximumNArgs(0),
|
||||
Use: "version",
|
||||
Short: "Show the Docker Compose version information",
|
||||
Args: cobra.MaximumNArgs(0),
|
||||
Hidden: true,
|
||||
RunE: func(cmd *cobra.Command, _ []string) error {
|
||||
runVersion(opts)
|
||||
return nil
|
||||
|
|
@ -51,7 +52,7 @@ func versionCommand() *cobra.Command {
|
|||
}
|
||||
|
||||
func runVersion(opts versionOptions) {
|
||||
displayedVersion := strings.TrimPrefix(internal.Version, "v")
|
||||
displayedVersion := strings.TrimPrefix(internal.ComposePluginVersion, "v")
|
||||
if opts.short {
|
||||
fmt.Println(displayedVersion)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue