Skip to content

Commit 349308c

Browse files
committed
update wp-cli on ee-update
1 parent 1f8ebec commit 349308c

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

CHANGELOG.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
v3.3.15 - Dec 9, 2015
2-
- Upgrade wp-cli version to 0.21.1.
2+
- Upgrade wp-cli version to 0.21.1
33

44
v 3.3.14 - Nov 10, 2015
55
- Fix EasyEngine installation issue

install

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,28 @@ function ee_sync_db()
216216
fi
217217
}
218218

219+
219220
function secure_ee_db()
220221
{
221222
chown -R root:root /var/lib/ee/
222223
chmod -R 600 /var/lib/ee/
223224
}
224225

226+
function ee_update_wp_cli()
227+
{
228+
ee_lib_echo "Updating WP-CLI version to resolve compatibility issue."
229+
PHP_PATH=$(which php)
230+
WP_CLI_PATH=$(which wp)
231+
232+
if [ "${WP_CLI_PATH}" != "" ]; then
233+
# Get WP-CLI version
234+
WP_CLI_VERSION=$(${PHP_PATH} ${WP_CLI_PATH} --allow-root cli version | awk '{ print $2 }')
235+
if [ "${WP_CLI_VERSION}" -lt "0.21.1" ]; then
236+
echo "y" | ee stack upgrade --wpcli
237+
fi
238+
fi
239+
}
240+
225241
# Install EasyEngine 3.x
226242
function ee_install()
227243
{
@@ -563,6 +579,7 @@ else
563579
ee_git_init | tee -ai $ee_install_log
564580
service nginx reload &>> /dev/null
565581
service php5-fpm restart &>> /dev/null
582+
ee_update_wp_cli | tee -ai $ee_install_log
566583
else
567584
ee_lib_error "Not updating EasyEngine to $ee_version_new, exit status = " 1
568585
fi

0 commit comments

Comments
 (0)