diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 14931cb9..448047fb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,6 @@ +v 2.0.1 - July 21, 2014 + - Fixed wp-cli installation #289 + v 2.0.0 - July 14, 2014 - Completly rewritten code - Updated wp-cli to 0.16.0 diff --git a/bin/update b/bin/update index 92c9acaf..bcf33184 100644 --- a/bin/update +++ b/bin/update @@ -232,7 +232,6 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then # Update EasyEngine current version EE_CURRENT_VERSION="1.2.2" fi - if [[ $EE_CURRENT_VERSION = 1.2.2 ]]; then # Update NGINX configuration sed -i "/worker_processes/a \worker_rlimit_nofile 100000;" /etc/nginx/nginx.conf @@ -337,7 +336,6 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then # Update EasyEngine current version EE_CURRENT_VERSION="1.3.0" fi - if [[ $EE_CURRENT_VERSION = 1.3.0 ]] || [[ $EE_CURRENT_VERSION = 1.3.1 ]] || [[ $EE_CURRENT_VERSION = 1.3.2 ]] || [[ $EE_CURRENT_VERSION = 1.3.3 ]]; then grep "^pm = ondemand" /etc/php5/fpm/pool.d/www.conf &>> $EE_UPDATE_LOG if [ $? -ne 0 ]; then @@ -379,15 +377,21 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then fi fi + # Update EasyEngine current version + EE_CURRENT_VERSION="2.0.0" + fi + fi + + if [[ $EE_CURRENT_VERSION < 2.0.1 ]]; then + if [[ $EE_CURRENT_VERSION = 2.0.0 ]]; then dpkg -l | grep php5-fpm &>> $EE_UPDATE_LOG if [ $? -eq 0 ]; then - EE_WP_CLI_VERSION_LOCAL=$(wp --allow-root --info | grep "WP-CLI version" | awk '{print $3}') - if [[ $EE_WP_CLI_VERSION_LOCAL != "$EE_WP_CLI_VERSION" ]]; then - rm -rf /usr/share/easyengine/wp-cli /usr/bin/wp /etc/bash_completion.d/wp-completion.bash + + # WP-CLI change the installation method + rm -rf /usr/share/easyengine/wp-cli /usr/share/wp-cli /usr/bin/wp /etc/bash_completion.d/wp-completion.bash - # Install WP-CLI - ee_ven_install_wpcli - fi + # Install WP-CLI + ee_ven_install_wpcli fi fi fi diff --git a/src/lib/ee_lib_variables.sh b/src/lib/ee_lib_variables.sh index 6729c0de..ed5cc394 100644 --- a/src/lib/ee_lib_variables.sh +++ b/src/lib/ee_lib_variables.sh @@ -1,7 +1,7 @@ # Define global variables # EasyEngine version -readonly EE_VERSION='2.0.0' +readonly EE_VERSION='2.0.1' # WP-CLI version readonly EE_WP_CLI_VERSION='0.16.0' diff --git a/src/vendor/ee_ven_install_wpcli.sh b/src/vendor/ee_ven_install_wpcli.sh index 0f6813c8..b78667b2 100644 --- a/src/vendor/ee_ven_install_wpcli.sh +++ b/src/vendor/ee_ven_install_wpcli.sh @@ -2,13 +2,14 @@ function ee_ven_install_wpcli() { - if [ ! -f /usr/local/bin/wp ]; then + if [ ! -f /usr/bin/wp ]; then ee_lib_echo "Downloading WP-CLI, please wait..." - wget -qO /usr/local/bin/wp https://github.com/wp-cli/wp-cli/releases/download/v${EE_WP_CLI_VERSION}/wp-cli.phar \ + wget -qO /usr/bin/wp https://github.com/wp-cli/wp-cli/releases/download/v${EE_WP_CLI_VERSION}/wp-cli.phar \ || ee_lib_error "Unable to download WP-CLI, exit status = " $? # Executable permission - chmod a+x /usr/local/bin/wp + chmod a+x /usr/bin/wp \ + || ee_lib_error "Unable to set executable permission for wp-cli, exit status = " $? # Download auto completion wget -qO /etc/bash_completion.d/wp-completion.bash https://raw.githubusercontent.com/wp-cli/wp-cli/v0.16.0/utils/wp-completion.bash