From 4aded46acaa724efea78e41556a8a4ee7b705ab4 Mon Sep 17 00:00:00 2001 From: jay Date: Sun, 5 Nov 2023 01:41:53 +0000 Subject: [PATCH] Update basic_search_replace.yml --- basic_search_replace.yml | 42 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/basic_search_replace.yml b/basic_search_replace.yml index dab826e..ab42e98 100644 --- a/basic_search_replace.yml +++ b/basic_search_replace.yml @@ -59,27 +59,27 @@ 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/ - ./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/ - rm -rf /var/www/webroot/.cache/vhosts/Jelastic/* - tail -8 /var/www/webroot/mightybox-search-replace-db/searchreplace.log | head -7 - - else: - - 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 - tail -8 /var/www/webroot/mightybox-search-replace-db/searchreplace.log | head -7 - - return: - type: success - message: ${response.out} + + - if ( ${settings.testMode} == false ): + - cmd [cp]: |- + cd /var/www/webroot/mightybox-search-replace-db/ + ./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/ + rm -rf /var/www/webroot/.cache/vhosts/Jelastic/* + tail -8 /var/www/webroot/mightybox-search-replace-db/searchreplace.log | head -7 + - if ( ${settings.testMode} == true ): + - cmd [cp]: |- + cd /var/www/webroot/mightybox-search-replace-db/ + ./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} buttons: