mirror of
https://github.com/YunoHost-Apps/framaforms_ynh.git
synced 2024-09-03 18:36:12 +02:00
Fix upgrade
This commit is contained in:
parent
d33c92307f
commit
35e445f8cd
1 changed files with 19 additions and 12 deletions
|
@ -126,26 +126,33 @@ ynh_script_progression --message="Upgrading Composer..." --weight=3
|
||||||
|
|
||||||
ynh_install_composer --phpversion="$phpversion" --workdir="$final_path/.composer"
|
ynh_install_composer --phpversion="$phpversion" --workdir="$final_path/.composer"
|
||||||
|
|
||||||
|
export PATH="$final_path/.composer/vendor/bin:$PATH"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE DRUPAL
|
# UPGRADE DRUPAL
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading Drupal..." --weight=30
|
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different --file="$final_path/$app/sites/default/settings.php"
|
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
|
then
|
||||||
|
ynh_script_progression --message="Upgrading Drupal..." --weight=30
|
||||||
|
|
||||||
export PATH="$final_path/.composer/vendor/bin:$PATH"
|
ynh_backup_if_checksum_is_different --file="$final_path/$app/sites/default/settings.php"
|
||||||
|
|
||||||
update-alternatives --set php /usr/bin/php$phpversion
|
chown -R $app: $final_path
|
||||||
|
|
||||||
pushd "$final_path"
|
update-alternatives --set php /usr/bin/php$phpversion
|
||||||
|
|
||||||
|
pushd "$final_path"
|
||||||
ynh_exec_as $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 1
|
ynh_exec_as $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 1
|
||||||
ynh_exec_as $app env PATH=$PATH drush @$app cache-clear all
|
ynh_exec_as $app env PATH=$PATH drush @$app cache-clear all
|
||||||
ynh_exec_as $app env PATH=$PATH drush @$app pm-update -y drupal
|
# ynh_exec_as $app env PATH=$PATH drush @$app pm-update -y drupal
|
||||||
|
ynh_exec_as $app env PATH=$PATH drush @$app updatedb -y
|
||||||
ynh_exec_as $app env PATH=$PATH drush @$app cache-clear all
|
ynh_exec_as $app env PATH=$PATH drush @$app cache-clear all
|
||||||
ynh_exec_as $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 0
|
ynh_exec_as $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 0
|
||||||
popd
|
popd
|
||||||
|
|
||||||
update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION}
|
update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION}
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CONFIG FILE CHECKSUM
|
# STORE THE CONFIG FILE CHECKSUM
|
||||||
|
|
Loading…
Reference in a new issue