Skip to content

Commit

Permalink
fix: update script
Browse files Browse the repository at this point in the history
  • Loading branch information
arturu committed Dec 14, 2024
1 parent 2df9c41 commit 05b6415
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions scripts/utility__upgrade_dev_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ current_path=$(pwd)
# Salvo lo stato dei moduli necessari all'aggiornamento
stato_config=$(drush pm:list --format=csv | grep "(config)" | awk -F ',' '{print $(NF-1)}')
stato_sunchronizo=$(drush pm:list --format=csv | grep "(sunchronizo)" | awk -F ',' '{print $(NF-1)}')
stato_keryx=$(drush pm:list --format=csv | grep "(keryx)" | awk -F ',' '{print $(NF-1)}')

printf "\n\n-- Mi sposto nella cartella dove si trova composer.json ----------"

Expand Down Expand Up @@ -95,10 +96,10 @@ drush -y config:import --partial --source="${drupal_dir}/modules/contrib/sunchro
drush cr

printf "\n\n-- Aggiorno i dati obbligatori -----------------------------------\n"
drush migrate:import taxonomy_common_uuid
drush migrate:import taxonomy_common
drush migrate:import scuola_roles
drush migrate:import main_menu
drush migrate:import --update taxonomy_common_uuid
drush migrate:import --update taxonomy_common
drush migrate:import --update scuola_roles
drush migrate:import --update main_menu

printf "\n\n-- Aggiorno le configurazioni di prosis e skenografia ------------\n"
composer require ouitoulia/skenografia:^2 --no-cache
Expand Down Expand Up @@ -129,6 +130,14 @@ drush -y config:import --partial --source="${drupal_dir}/modules/contrib/anazete
drush cr
drush cron -y

if [ "$stato_keryx" != "Enabled" ]; then
printf "\n\n-- Keryx è installato lo aggiorno --------------------------------\n"
drush -y config:import --partial --source="$(drush drupal:directory)/modules/contrib/keryx/config/install/"
drush -y config:import --partial --source="$(drush drupal:directory)/modules/contrib/keryx/config/update/"
drush migrate:import --update amministrazione_trasparente_obblighi
drush migrate:import --update amministrazione_trasparente_categorie
fi

printf "\n\n-- Disattivo i moduli config e sunchronizo se erano disattivati --\n"
if [ "$stato_config" = "Disabled" ]; then
drush -y pm:uninstall config
Expand Down

0 comments on commit 05b6415

Please sign in to comment.