|
48 | 48 | # Define variables for later use |
49 | 49 | ee_branch=$1 |
50 | 50 | readonly ee_version_old="2.2.3" |
51 | | -readonly ee_version_new="3.3.14" |
| 51 | +readonly ee_version_new="3.3.15" |
52 | 52 | readonly ee_log_dir=/var/log/ee/ |
53 | 53 | readonly ee_install_log=/var/log/ee/install.log |
54 | 54 | readonly ee_linux_distro=$(lsb_release -i | awk '{print $3}') |
@@ -216,12 +216,30 @@ function ee_sync_db() |
216 | 216 | fi |
217 | 217 | } |
218 | 218 |
|
| 219 | + |
219 | 220 | function secure_ee_db() |
220 | 221 | { |
221 | 222 | chown -R root:root /var/lib/ee/ |
222 | 223 | chmod -R 600 /var/lib/ee/ |
223 | 224 | } |
224 | 225 |
|
| 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 | + if [ "${WP_CLI_PATH}" != "" ]; then |
| 232 | + # Get WP-CLI version |
| 233 | + WP_CLI_VERSION=$(${PHP_PATH} ${WP_CLI_PATH} --allow-root cli version | awk '{ print $2 }') |
| 234 | + dpkg --compare-versions ${WP_CLI_VERSION} lt 0.21.1 |
| 235 | + # Update WP-CLI version |
| 236 | + if [ "$?" == "0" ]; then |
| 237 | + wget -qO ${WP_CLI_PATH} https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar |
| 238 | + chmod +x ${WP_CLI_PATH} |
| 239 | + fi |
| 240 | + fi |
| 241 | +} |
| 242 | + |
225 | 243 | # Install EasyEngine 3.x |
226 | 244 | function ee_install() |
227 | 245 | { |
|
563 | 581 | ee_git_init | tee -ai $ee_install_log |
564 | 582 | service nginx reload &>> /dev/null |
565 | 583 | service php5-fpm restart &>> /dev/null |
| 584 | + ee_update_wp_cli | tee -ai $ee_install_log |
566 | 585 | else |
567 | 586 | ee_lib_error "Not updating EasyEngine to $ee_version_new, exit status = " 1 |
568 | 587 | fi |
|
0 commit comments