1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/framaforms_ynh.git synced 2024-09-03 18:36:12 +02:00

Change upstream to Yakforms, handle migration.

This commit is contained in:
ljf 2022-12-09 18:47:56 +01:00 committed by Félix Piédallu
parent 382f16cadf
commit 512f1e558d
3 changed files with 35 additions and 1 deletions

0
conf/extra_php-fpm.conf Normal file
View file

View file

@ -13,7 +13,7 @@ maintainers = []
[upstream] [upstream]
license = "GPL-2.0-only" license = "GPL-2.0-only"
website = "https://framaforms.org" website = "https://yakforms.org"
code = "https://framagit.org/yakforms/yakforms" code = "https://framagit.org/yakforms/yakforms"
fund = "https://soutenir.framasoft.org" fund = "https://soutenir.framasoft.org"

View file

@ -12,6 +12,25 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
#=================================================
# Framaforms 2 Yakforms Backup
#=================================================
upgrade_to_yakforms=true
if [ "$upgrade_to_yakforms" = false ]; then
pushd "$install_dir"
ynh_exec_as "$app" env "PATH=$PATH" "php$phpversion" framaforms2yakforms.php backup
_ynh_exec_with_drush_php drush "@$app" dis framaforms
_ynh_exec_with_drush_php drush "@$app" pm-uninstall framaforms
_ynh_exec_with_drush_php drush "@$app" dis framaforms_share_results
_ynh_exec_with_drush_php drush "@$app" pm-uninstall framaforms_share_results
_ynh_exec_with_drush_php drush "@$app" dis framaforms_public_results
_ynh_exec_with_drush_php drush "@$app" pm-uninstall framaforms_public_results
_ynh_exec_with_drush_php drush "@$app" dis framaforms_spam
_ynh_exec_with_drush_php drush "@$app" pm-uninstall framaforms_spam
popd
fi
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
@ -33,6 +52,21 @@ ynh_script_progression --message="Upgrading Composer..." --weight=3
ynh_install_composer --phpversion="$phpversion" --workdir="$install_dir/.composer" ynh_install_composer --phpversion="$phpversion" --workdir="$install_dir/.composer"
#=================================================
# Framaforms 2 Yakforms Restore
#=================================================
if [ "$upgrade_to_yakforms" = true ]; then
pushd "$install_dir"
_ynh_exec_with_drush_php drush "@$app" en yakforms
_ynh_exec_with_drush_php drush "@$app" dis yakforms_share_results
_ynh_exec_with_drush_php drush "@$app" dis yakforms_public_results
_ynh_exec_with_drush_php drush "@$app" dis yakforms_spam
ynh_exec_as "$app" env "PATH=$PATH" "php$phpversion" framaforms2yakforms.php restore
ynh_exec_as "$app" env "PATH=$PATH" "php$phpversion" framaforms2yakforms.php clean
popd
fi
#================================================= #=================================================
# UPGRADE DRUPAL # UPGRADE DRUPAL
#================================================= #=================================================