mirror of
https://github.com/YunoHost-Apps/kimai2_ynh.git
synced 2024-09-03 19:26:26 +02:00
Update upgrade
Remove local.yaml for major version upgrade
This commit is contained in:
parent
baf9273c53
commit
2e92e115c8
1 changed files with 14 additions and 10 deletions
|
@ -112,16 +112,20 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="$database" --keep="config/packages/local.yaml var/invoices/ var/data/"
|
||||
fi
|
||||
|
||||
if ynh_compare_current_package_version --comparison le --version 1.30.0~ynh1
|
||||
then
|
||||
ynh_script_progression --message="Doing a hard cache flush for major Kimai 2 update from version 1.x to 2.x"
|
||||
# https://www.kimai.org/documentation/updates.html
|
||||
ynh_secure_remove --file="$final_path/var/cache/*"
|
||||
ynh_secure_remove --file="$final_path/var/plugins/*"
|
||||
if ynh_compare_current_package_version --comparison le --version 1.30.0~ynh1
|
||||
then
|
||||
ynh_script_progression --message="Doing a hard cache flush for major Kimai 2 update from version 1.x to 2.x"
|
||||
# https://www.kimai.org/documentation/updates.html
|
||||
ynh_secure_remove --file="$final_path/var/cache/*"
|
||||
ynh_secure_remove --file="$final_path/var/plugins/*"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
# Remove local.yaml as recommended for major version upgrade https://github.com/kimai/kimai/blob/main/UPGRADING.md
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="$database" --keep="var/invoices/ var/data/"
|
||||
else
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="$database" --keep="config/packages/local.yaml var/invoices/ var/data/"
|
||||
fi
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
|
|
Loading…
Add table
Reference in a new issue