@@ -12,12 +12,14 @@ import (
12
12
13
13
"code.cloudfoundry.org/cli/actor/sharedaction"
14
14
"code.cloudfoundry.org/cli/actor/v7action"
15
+ "code.cloudfoundry.org/cli/actor/v7pushaction"
15
16
"code.cloudfoundry.org/cli/api/cloudcontroller/ccversion"
16
17
"code.cloudfoundry.org/cli/cf/commandregistry"
17
18
"code.cloudfoundry.org/cli/command"
18
19
"code.cloudfoundry.org/clock"
19
20
20
21
"code.cloudfoundry.org/cli/util/configv3"
22
+ "code.cloudfoundry.org/cli/util/manifestparser"
21
23
"code.cloudfoundry.org/cli/util/progressbar"
22
24
"code.cloudfoundry.org/cli/util/ui"
23
25
"github.com/gorilla/websocket"
@@ -223,6 +225,8 @@ func (c *CFPushApp) Init(appDir string, manifestPath string, overrides CFPushApp
223
225
224
226
// Manifest path
225
227
c .pushCommand .PathToManifest = flag .ManifestPathWithExistenceCheck (manifestPath )
228
+ c .pushCommand .ManifestLocator = manifestparser .NewLocator ()
229
+ c .pushCommand .ManifestParser = manifestparser.ManifestParser {}
226
230
227
231
return nil
228
232
}
@@ -231,6 +235,8 @@ func (c *CFPushApp) Init(appDir string, manifestPath string, overrides CFPushApp
231
235
func (c * CFPushApp ) setConfig (config * configv3.Config ) error {
232
236
config .SetOrganizationInformation (c .config .OrgGUID , c .config .OrgName )
233
237
config .SetSpaceInformation (c .config .SpaceGUID , c .config .SpaceName , false )
238
+ c .pushCommand .VersionActor = c .pushCommand .Actor
239
+ c .pushCommand .PushActor = v7pushaction .NewActor (c .pushCommand .Actor , sharedaction .NewActor (config ))
234
240
return nil
235
241
}
236
242
@@ -263,7 +269,11 @@ func (c *CFPushApp) Run(msgSender DeployAppMessageSender, clientWebsocket *webso
263
269
defer commandUI .FlushDeferred ()
264
270
265
271
err = c .setup (config , commandUI , msgSender , clientWebsocket )
266
- // err = c.pushCommand.Setup(config, commandUI)
272
+ if err != nil {
273
+ return handleError (err , * commandUI )
274
+ }
275
+
276
+ err = c .pushCommand .Setup (config , commandUI )
267
277
if err != nil {
268
278
return handleError (err , * commandUI )
269
279
}
@@ -276,6 +286,7 @@ func (c *CFPushApp) Run(msgSender DeployAppMessageSender, clientWebsocket *webso
276
286
277
287
// Set to a null progress bar
278
288
c .pushCommand .ProgressBar = & cfPushProgressBar {}
289
+ c .pushCommand .DiffDisplayer = shared .NewManifestDiffDisplayer (commandUI )
279
290
280
291
// Perform the push
281
292
args := make ([]string , 0 )
@@ -294,7 +305,7 @@ func (c *CFPushApp) setup(config command.Config, ui command.UI, msgSender Deploy
294
305
sharedActor := sharedaction .NewActor (config )
295
306
cmd .SharedActor = sharedActor
296
307
297
- ccClient , uaaClient , routingClient , err := shared .GetNewClientsAndConnectToCF (config , ui , ccversion .MinSupportedClientVersionV8 )
308
+ ccClient , uaaClient , routingClient , err := shared .GetNewClientsAndConnectToCF (config , ui , ccversion .MinSupportedV2ClientVersion )
298
309
if err != nil {
299
310
return err
300
311
}
@@ -313,6 +324,7 @@ func (c *CFPushApp) setup(config command.Config, ui command.UI, msgSender Deploy
313
324
return err
314
325
}
315
326
327
+ ccClientV3 .Requester = ccClient .Requester
316
328
v7Actor := v7action .NewActor (ccClientV3 , config , sharedActor , uaaClient , routingClient , clock .NewClock ())
317
329
318
330
cmd .Actor = v7Actor
0 commit comments