@@ -35,7 +35,12 @@ func NewComposeWrapper(binaryPath, configPath string) (libstack.Deployer, error)
35
35
func (wrapper * ComposeWrapper ) Deploy (ctx context.Context , workingDir , host , projectName string , filePaths []string , envFilePath string , forceRereate bool ) error {
36
36
output , err := wrapper .Command (newUpCommand (filePaths , forceRereate ), workingDir , host , projectName , envFilePath )
37
37
if len (output ) != 0 {
38
- log .Printf ("[libstack,composebinary] [message: finish deploying] [output: %s] [err: %s]" , output , err )
38
+ if err != nil {
39
+ log .Printf ("[libstack,composebinary] [message: deploy complete] [output: %s] [err: %s]" , output , err )
40
+ return nil
41
+ }
42
+
43
+ log .Printf ("[libstack,composebinary] [message: deploy complete] [output: %s] [success]" , output )
39
44
}
40
45
41
46
return err
@@ -45,7 +50,12 @@ func (wrapper *ComposeWrapper) Deploy(ctx context.Context, workingDir, host, pro
45
50
func (wrapper * ComposeWrapper ) Remove (ctx context.Context , workingDir , host , projectName string , filePaths []string ) error {
46
51
output , err := wrapper .Command (newDownCommand (filePaths ), workingDir , host , projectName , "" )
47
52
if len (output ) != 0 {
48
- log .Printf ("[libstack,composebinary] [message: finish deploying] [output: %s] [err: %s]" , output , err )
53
+ if err != nil {
54
+ log .Printf ("[libstack,composebinary] [message: remove complete] [output: %s] [err: %s]" , output , err )
55
+ return nil
56
+ }
57
+
58
+ log .Printf ("[libstack,composebinary] [message: remove complete] [output: %s] [success]" , output )
49
59
}
50
60
51
61
return err
@@ -56,7 +66,12 @@ func (wrapper *ComposeWrapper) Remove(ctx context.Context, workingDir, host, pro
56
66
func (wrapper * ComposeWrapper ) Pull (ctx context.Context , workingDir , host , projectName string , filePaths []string ) error {
57
67
output , err := wrapper .Command (newPullCommand (filePaths ), workingDir , host , projectName , "" )
58
68
if len (output ) != 0 {
59
- log .Printf ("[libstack,composebinary] [message: finish deploying] [output: %s] [err: %s]" , output , err )
69
+ if err != nil {
70
+ log .Printf ("[libstack,composebinary] [message: pull complete] [output: %s] [err: %s]" , output , err )
71
+ return nil
72
+ }
73
+
74
+ log .Printf ("[libstack,composebinary] [message: pull complete] [output: %s] [success]" , output )
60
75
}
61
76
62
77
return err
0 commit comments