Update basic_search_replace.yml
If the terms to search and replace are the same, the operations stops and will return a warning message. Fixed the search and replace phrase issuemain
parent
e103966d61
commit
e2cf733d47
|
@ -1,6 +1,6 @@
|
||||||
type: update
|
type: update
|
||||||
name: Search Replace DB
|
name: Search Replace DB
|
||||||
description: Databse Search and Replace utility
|
description: Database Search and Replace utility
|
||||||
logo: https://d33v4339jhl8k0.cloudfront.net/docs/assets/629d6154f38bfd3f4a4c3046/images/62ce4ffaeabe9a7235b3d220/white-300.png
|
logo: https://d33v4339jhl8k0.cloudfront.net/docs/assets/629d6154f38bfd3f4a4c3046/images/62ce4ffaeabe9a7235b3d220/white-300.png
|
||||||
|
|
||||||
targetNodes:
|
targetNodes:
|
||||||
|
@ -60,6 +60,10 @@ actions:
|
||||||
- command: ${this.cmd}
|
- command: ${this.cmd}
|
||||||
|
|
||||||
searchReplace:
|
searchReplace:
|
||||||
|
- if ( '${settings.termSearch}' === '${settings.termReplace}' ):
|
||||||
|
stopEvent:
|
||||||
|
type: warning
|
||||||
|
message: Term to search is the same with term to replace. No action necessary.
|
||||||
|
|
||||||
- if ( ${settings.testMode} == false ):
|
- if ( ${settings.testMode} == false ):
|
||||||
- cmd [cp]: |-
|
- cmd [cp]: |-
|
||||||
|
@ -68,10 +72,7 @@ actions:
|
||||||
wp cache flush --quiet --path=/var/www/webroot/ROOT/
|
wp cache flush --quiet --path=/var/www/webroot/ROOT/
|
||||||
rm -rf /var/www/webroot/.cache/vhosts/Jelastic/*
|
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
|
||||||
- if ( '${settings.termSearch}' === '${settings.termReplace}' ):
|
|
||||||
- cmd [cp]: |-
|
|
||||||
cd /var/www/webroot/mightybox-search-replace-db/
|
|
||||||
echo "Term to search is the same with term to replace. No action necessary"
|
|
||||||
- if ( ${settings.testMode} == true ):
|
- if ( ${settings.testMode} == true ):
|
||||||
- cmd [cp]: |-
|
- cmd [cp]: |-
|
||||||
cd /var/www/webroot/mightybox-search-replace-db/
|
cd /var/www/webroot/mightybox-search-replace-db/
|
||||||
|
@ -79,10 +80,7 @@ actions:
|
||||||
wp cache flush --quiet --path=/var/www/webroot/ROOT/
|
wp cache flush --quiet --path=/var/www/webroot/ROOT/
|
||||||
rm -rf /var/www/webroot/.cache/vhosts/Jelastic/*
|
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
|
||||||
- if ( '${settings.termSearch}' === '${settings.termReplace}' ):
|
|
||||||
- cmd [cp]: |-
|
|
||||||
cd /var/www/webroot/mightybox-search-replace-db/
|
|
||||||
echo "Term to search is the same with term to replace. No action necessary"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue