diff --git a/conf/0.8.5.src b/conf/0.8.5.src new file mode 100644 index 0000000..0bd9166 --- /dev/null +++ b/conf/0.8.5.src @@ -0,0 +1,6 @@ +SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-0.8.5.tar.bz2 +SOURCE_SUM=6cd90b806b35386e4d5be98e2db26ca3dbbd32a74538bedefcd9fbad0bfc8d5a +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=tar.bz2 +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= diff --git a/conf/0.9.8.src b/conf/0.9.8.src new file mode 100644 index 0000000..01152be --- /dev/null +++ b/conf/0.9.8.src @@ -0,0 +1,6 @@ +SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-0.9.8.1.tar.bz2 +SOURCE_SUM=7cc64b51c9721c2dd7ee510f245bcfc4693ee07f74581ad74003906eb4716ef1 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=tar.bz2 +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= diff --git a/manifest.json b/manifest.json index 0545d5b..2460e78 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Software to manage association", "fr": "Logiciel libre de gestion d'association" }, - "version": "1.0.7~ynh1", + "version": "1.0.7~ynh2", "url": "http://garradin.eu/a-propos/", "license": "GPL-3.0-or-later", "maintainer": { diff --git a/pull_request_template.md b/pull_request_template.md index b8b0a14..040e119 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -11,8 +11,3 @@ - [ ] Upgrade from last version tested. - [ ] Can be reviewed and tested. -## Package_check results ---- -*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* - -[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/garradin_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/garradin_ynh%20PR-NUM-%20(USERNAME)/) diff --git a/scripts/upgrade b/scripts/upgrade index cb15d46..acd69fb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -24,11 +24,14 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION #================================================= -if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1; then - ynh_print_info --message="Sorry your version is outdated and need first an update to version 0.9.8.1 with the branch 0.9.8, proceed like that: 'sudo yunohost app upgrade garradin -u https://github.com/YunoHost-Apps/garradin_ynh/tree/0.9.8 --debug' and open your admin page to finalize before next update" - ynh_die "Sorry your version is outdated and need first an update to version 0.9.8.1 with the branch 0.9.8, proceed like that: 'sudo yunohost app upgrade garradin -u https://github.com/YunoHost-Apps/garradin_ynh/tree/0.9.8 --debug' and open your admin page to finalize before next update" +if ynh_compare_current_package_version --comparison lt --version 0.8.5~ynh1; then + upgrade_type="0.8.5" else - upgrade_type=$(ynh_check_app_version_changed) + if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1; then + upgrade_type="0.9.8" + else + upgrade_type=$(ynh_check_app_version_changed) + fi fi #================================================= @@ -72,11 +75,47 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# UPGRADE TO 0.8.5 if necessary +#================================================= + +if [ "$upgrade_type" == "0.8.5" ] +then + ynh_script_progression --message="Upgrading upgrade to 0.8.5" --weight=5 + # Download, check integrity, uncompress and patch the source from 0.8.5.src + ynh_setup_source --dest_dir="$final_path" --source_id="0.8.5" + ynh_add_nginx_config + ynh_add_fpm_config --package="$extra_php_dependencies" + phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) + ynh_systemd_action --service_name=nginx --action=reload + #finalyse upgrade + ynh_local_curl "/admin/index.php" + upgrade_type="0.9.8" +fi + +#================================================= +# UPGRADE TO 0.9.8 if necessary +#================================================= + +if [ "$upgrade_type" == "0.9.8" ] +then + ynh_script_progression --message="Upgrading upgrade to 0.9.8" --weight=5 + # Download, check integrity, uncompress and patch the source from 0.9.8.src + ynh_setup_source --dest_dir="$final_path" --source_id="0.9.8" + ynh_add_nginx_config + ynh_add_fpm_config --package="$extra_php_dependencies" + phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) + ynh_systemd_action --service_name=nginx --action=reload + #finalyse upgrade + ynh_local_curl "/admin/index.php" + upgrade_type="UPGRADE_APP" +fi #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Upgrading source files..." --weight=5 + if [ "$upgrade_type" == "UPGRADE_APP" ] then # Download, check integrity, uncompress and patch the source from app.src