@@ -38,7 +38,6 @@ import (
3838 "github.com/pkg/errors"
3939 "github.com/sirupsen/logrus"
4040
41- "github.com/docker/compose-cli/internal"
4241 "github.com/docker/compose-cli/pkg/api"
4342 "github.com/docker/compose-cli/pkg/progress"
4443 "github.com/docker/compose-cli/pkg/utils"
@@ -141,7 +140,7 @@ func prepareNetworks(project *types.Project) {
141140 for k , network := range project .Networks {
142141 network .Labels = network .Labels .Add (api .NetworkLabel , k )
143142 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 )
145144 project .Networks [k ] = network
146145 }
147146}
@@ -184,7 +183,7 @@ func (s *composeService) ensureProjectVolumes(ctx context.Context, project *type
184183 for k , volume := range project .Volumes {
185184 volume .Labels = volume .Labels .Add (api .VolumeLabel , k )
186185 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 )
188187 err := s .ensureVolume (ctx , volume )
189188 if err != nil {
190189 return err
@@ -216,7 +215,7 @@ func (s *composeService) getCreateOptions(ctx context.Context, p *types.Project,
216215
217216 labels [api .ProjectLabel ] = p .Name
218217 labels [api .ServiceLabel ] = service .Name
219- labels [api .VersionLabel ] = internal . Version
218+ labels [api .VersionLabel ] = api . ComposeVersion
220219 if _ , ok := service .Labels [api .OneoffLabel ]; ! ok {
221220 labels [api .OneoffLabel ] = "False"
222221 }
0 commit comments