Update basic_search_replace.yml

main
jay 2023-11-05 01:41:53 +00:00
parent eb65f23a08
commit 4aded46aca
1 changed files with 21 additions and 21 deletions

View File

@ -59,12 +59,7 @@ actions:
- command: ${this.cmd}
searchReplace:
- if ( ${settings.termSearch} == ${settings.termReplace} ):
- return:
type: warning
message: "Term to search is the same with term to replace. No action was done"
- else:
- if ( ${settings.testMode} == false ):
- cmd [cp]: |-
cd /var/www/webroot/mightybox-search-replace-db/
@ -72,11 +67,16 @@ actions:
wp cache flush --quiet --path=/var/www/webroot/ROOT/
rm -rf /var/www/webroot/.cache/vhosts/Jelastic/*
tail -8 /var/www/webroot/mightybox-search-replace-db/searchreplace.log | head -7
- else:
- if ( ${settings.testMode} == true ):
- cmd [cp]: |-
cd /var/www/webroot/mightybox-search-replace-db/
./basic_search_replace-dry-run.sh "${settings.termSearch}" "${settings.termReplace}" >> /var/www/webroot/mightybox-search-replace-db/searchreplace.log
./basic_search_replace.sh "${settings.termSearch}" "${settings.termReplace}" -z >> /var/www/webroot/mightybox-search-replace-db/searchreplace.log
wp cache flush --quiet --path=/var/www/webroot/ROOT/
rm -rf /var/www/webroot/.cache/vhosts/Jelastic/*
tail -8 /var/www/webroot/mightybox-search-replace-db/searchreplace.log | head -7
- return:
type: success
message: ${response.out}