Update basic_search_replace.yml

main
denny 2023-11-02 17:06:02 +00:00
parent bc7949558d
commit 8879c9743a
1 changed files with 21 additions and 16 deletions

View File

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