@@ -38,7 +38,6 @@ import (
38
38
"github.com/pkg/errors"
39
39
"github.com/sirupsen/logrus"
40
40
41
- "github.com/docker/compose-cli/internal"
42
41
"github.com/docker/compose-cli/pkg/api"
43
42
"github.com/docker/compose-cli/pkg/progress"
44
43
"github.com/docker/compose-cli/pkg/utils"
@@ -141,7 +140,7 @@ func prepareNetworks(project *types.Project) {
141
140
for k , network := range project .Networks {
142
141
network .Labels = network .Labels .Add (api .NetworkLabel , k )
143
142
network .Labels = network .Labels .Add (api .ProjectLabel , project .Name )
144
- network .Labels = network .Labels .Add (api .VersionLabel , internal . Version )
143
+ network .Labels = network .Labels .Add (api .VersionLabel , api . ComposeVersion )
145
144
project .Networks [k ] = network
146
145
}
147
146
}
@@ -184,7 +183,7 @@ func (s *composeService) ensureProjectVolumes(ctx context.Context, project *type
184
183
for k , volume := range project .Volumes {
185
184
volume .Labels = volume .Labels .Add (api .VolumeLabel , k )
186
185
volume .Labels = volume .Labels .Add (api .ProjectLabel , project .Name )
187
- volume .Labels = volume .Labels .Add (api .VersionLabel , internal . Version )
186
+ volume .Labels = volume .Labels .Add (api .VersionLabel , api . ComposeVersion )
188
187
err := s .ensureVolume (ctx , volume )
189
188
if err != nil {
190
189
return err
@@ -216,7 +215,7 @@ func (s *composeService) getCreateOptions(ctx context.Context, p *types.Project,
216
215
217
216
labels [api .ProjectLabel ] = p .Name
218
217
labels [api .ServiceLabel ] = service .Name
219
- labels [api .VersionLabel ] = internal . Version
218
+ labels [api .VersionLabel ] = api . ComposeVersion
220
219
if _ , ok := service .Labels [api .OneoffLabel ]; ! ok {
221
220
labels [api .OneoffLabel ] = "False"
222
221
}
0 commit comments