This repository was archived by the owner on Nov 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ STATIC_FLAGS=CGO_ENABLED=0
28
28
29
29
GIT_TAG? =$(shell git describe --tags --match "v[0-9]* ")
30
30
31
- LDFLAGS ="-s -w -X $(PKG_NAME ) /internal.Version=${GIT_TAG}"
31
+ LDFLAGS ="-s -w -X $(PKG_NAME ) /internal.Version=${GIT_TAG} -X $( PKG_NAME ) /internal.ComposePluginVersion=2.0.0-beta.1 "
32
32
GO_BUILD =$(STATIC_FLAGS ) go build -trimpath -ldflags=$(LDFLAGS )
33
33
34
34
BINARY? =bin/docker
Original file line number Diff line number Diff line change @@ -34,9 +34,10 @@ type versionOptions struct {
34
34
func versionCommand () * cobra.Command {
35
35
opts := versionOptions {}
36
36
cmd := & cobra.Command {
37
- Use : "version" ,
38
- Short : "Show the Docker Compose version information" ,
39
- Args : cobra .MaximumNArgs (0 ),
37
+ Use : "version" ,
38
+ Short : "Show the Docker Compose version information" ,
39
+ Args : cobra .MaximumNArgs (0 ),
40
+ Hidden : true ,
40
41
RunE : func (cmd * cobra.Command , _ []string ) error {
41
42
runVersion (opts )
42
43
return nil
@@ -51,7 +52,7 @@ func versionCommand() *cobra.Command {
51
52
}
52
53
53
54
func runVersion (opts versionOptions ) {
54
- displayedVersion := strings .TrimPrefix (internal .Version , "v" )
55
+ displayedVersion := strings .TrimPrefix (internal .ComposePluginVersion , "v" )
55
56
if opts .short {
56
57
fmt .Println (displayedVersion )
57
58
return
Original file line number Diff line number Diff line change @@ -26,4 +26,6 @@ const (
26
26
var (
27
27
// Version is the version of the CLI injected in compilation time
28
28
Version = "dev"
29
+ // ComposePluginVersion is the version of the compose cli plugin, injected in compilation time
30
+ ComposePluginVersion = "dev"
29
31
)
Original file line number Diff line number Diff line change @@ -61,6 +61,6 @@ func main() {
61
61
manager.Metadata {
62
62
SchemaVersion : "0.1.0" ,
63
63
Vendor : "Docker Inc." ,
64
- Version : strings .TrimPrefix (internal .Version , "v" ),
64
+ Version : strings .TrimPrefix (internal .ComposePluginVersion , "v" ),
65
65
})
66
66
}
You can’t perform that action at this time.
0 commit comments