File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 96
96
97
97
});
98
98
99
+ desc ('Upgrade WordPress DB ' );
100
+ task ('core_db:update ' , function () {
101
+
102
+ $ ee_version = run ('ee --version ' );
103
+
104
+ if ( false !== strpos ( $ ee_version , 'EasyEngine v3 ' ) ) {
105
+
106
+ $ output = run ('cd {{release_path}} && wp core update-db ' );
107
+
108
+ } elseif ( false !== strpos ( $ ee_version , 'EE 4 ' ) ) {
109
+
110
+ cd ( '{{deploy_path}} ' );
111
+ $ output = run ( 'cd current && ee shell --command="wp core update-db" --skip-tty ' );
112
+
113
+ } else {
114
+ echo 'Skipping WordPress db core update as EasyEnigne is not installed. ' ;
115
+ }
116
+
117
+ writeln ('<info> ' . $ output . '</info> ' );
118
+
119
+ });
120
+
99
121
desc ('Symlink wp-config.php ' );
100
122
task ('wp:config ' , function () {
101
123
run ('[ ! -f {{release_path}}/../wp-config.php ] && cd {{release_path}}/../ && ln -sn ../wp-config.php && echo "Created Symlink for wp-config.php." || echo "" ' );
125
147
'deploy:symlink ' ,
126
148
'permissions:set ' ,
127
149
'opcache:reset ' ,
150
+ 'core_db:update ' ,
128
151
'deploy:unlock ' ,
129
152
'cleanup '
130
153
]);
You can’t perform that action at this time.
0 commit comments