File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed
Process/Deploy/InstallUpdate
Test/Unit/Process/Deploy/InstallUpdate Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -112,11 +112,13 @@ public function execute()
112
112
}
113
113
114
114
try {
115
- $ this ->shell ->execute ("echo 'Installation time: '$(date) " );
115
+ $ installUpgradeLog = $ this ->fileList ->getInstallUpgradeLog ();
116
+
117
+ $ this ->shell ->execute ('echo \'Installation time: \'$(date) | tee -a ' . $ installUpgradeLog );
116
118
$ this ->shell ->execute (sprintf (
117
119
'/bin/bash -c "set -o pipefail; %s | tee -a %s" ' ,
118
120
escapeshellcmd ($ command ),
119
- $ this -> fileList -> getInstallUpgradeLog ()
121
+ $ installUpgradeLog
120
122
));
121
123
} catch (ShellException $ exception ) {
122
124
throw new ProcessException ($ exception ->getMessage (), $ exception ->getCode (), $ exception );
Original file line number Diff line number Diff line change @@ -93,14 +93,15 @@ public function execute()
93
93
94
94
try {
95
95
$ verbosityLevel = $ this ->stageConfig ->get (DeployInterface::VAR_VERBOSE_COMMANDS );
96
+ $ installUpgradeLog = $ this ->fileList ->getInstallUpgradeLog ();
96
97
97
98
$ this ->logger ->info ('Running setup upgrade. ' );
98
99
99
- $ this ->shell ->execute (" echo 'Upgrading time: '$(date) " );
100
+ $ this ->shell ->execute (' echo \' Updating time: \ '$(date) | tee -a ' . $ installUpgradeLog );
100
101
$ this ->shell ->execute (sprintf (
101
102
'/bin/bash -c "set -o pipefail; %s | tee -a %s" ' ,
102
103
'php ./bin/magento setup:upgrade --keep-generated --ansi --no-interaction ' . $ verbosityLevel ,
103
- $ this -> fileList -> getInstallUpgradeLog ()
104
+ $ installUpgradeLog
104
105
));
105
106
} catch (\RuntimeException $ exception ) {
106
107
//Rollback required by database
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ public function testExecute(
187
187
$ this ->shellMock ->expects ($ this ->exactly (2 ))
188
188
->method ('execute ' )
189
189
->withConsecutive (
190
- [" echo 'Installation time: '$(date) " ],
190
+ [' echo \ 'Installation time: \ '$(date) | tee -a ' . $ installUpgradeLog ],
191
191
['/bin/bash -c "set -o pipefail; '
192
192
. ' php ./bin/magento setup:install -n --session-save=db --cleanup-database --currency= \'USD \''
193
193
. ' --base-url= \'http://unsecure.url \' --base-url-secure= \'https://secure.url \' --language= \'fr_FR \''
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ public function testExecute()
108
108
$ this ->shellMock ->expects ($ this ->exactly (2 ))
109
109
->method ('execute ' )
110
110
->withConsecutive (
111
- [" echo 'Upgrading time: '$(date) " ],
111
+ [' echo \' Updating time: \ '$(date) | tee -a ' . $ installUpgradeLog ],
112
112
['/bin/bash -c "set -o pipefail; php ./bin/magento setup:upgrade '
113
113
. '--keep-generated --ansi --no-interaction -v | tee -a '
114
114
. $ installUpgradeLog . '" ' ]
You can’t perform that action at this time.
0 commit comments