Skip to content
Snippets Groups Projects

Feature/disable cache

Merged Krzysztof Dyszczyk requested to merge feature/disable-cache into master
All threads resolved!
2 files
+ 11
28
Compare changes
  • Side-by-side
  • Inline
Files
2
#!/bin/bash
#!/bin/sh
echo "Common bootstrap!"
@@ -41,7 +41,7 @@ install_wordpress() {
install_woocommerce() {
echo "Installing woocommerce..."
if [ -n "$WOOCOMMERCE_VERSION" ] && [ "github" == "$WOOCOMMERCE_VERSION" ]
if [ -n "$WOOCOMMERCE_VERSION" ] && [ "github" = "$WOOCOMMERCE_VERSION" ]
then
TMP_WORK_DIR=$(pwd)
GITHUB_CACHE_DIR=/cache/github
@@ -69,12 +69,12 @@ install_woocommerce() {
}
install_woocommerce_from_backup() {
if [ -n "$WOOCOMMERCE_VERSION" ] && [ "github" == "$WOOCOMMERCE_VERSION" ]
if [ -n "$WOOCOMMERCE_VERSION" ] && [ "github" = "$WOOCOMMERCE_VERSION" ]
then
install_woocommerce
else
echo "Installing woocommerce from backup..."
cp -r $WOOCOMMERCE_CACHE_DIR $APACHE_DOCUMENT_ROOT/wp-content/plugins
cp -r $WOOCOMMERCE_CACHE_DIR/* $APACHE_DOCUMENT_ROOT/wp-content/plugins/woocommerce
fi
}
@@ -180,30 +180,9 @@ then
install_wordpress
if [ ! -f $DB_BACKUP_FILE ]
then
install_themes
install_woocommerce
configure_woocommerce
else
import_database
wp option update siteurl "http://${WOOTESTS_IP}" --path=$APACHE_DOCUMENT_ROOT --allow-root
wp option update home "http://${WOOTESTS_IP}" --path=$APACHE_DOCUMENT_ROOT --allow-root
install_themes_from_backup
install_woocommerce_from_backup
install_uploads_from_backup
wp core update-db --path=$APACHE_DOCUMENT_ROOT --allow-root
wp plugin update woocommerce --path=$APACHE_DOCUMENT_ROOT --allow-root
wp wc update --path=$APACHE_DOCUMENT_ROOT --allow-root
fi
make_database_backup
backup_woocommerce
backup_themes
backup_uploads
install_themes
install_woocommerce
configure_woocommerce
fi
Loading