mirror of
https://github.com/YunoHost-Apps/kimai2_ynh.git
synced 2024-09-03 19:26:26 +02:00
Fix upgrading (#80)
* Auto-update README * Update local.yaml Remove duplicate security block * Update upgrade Doing a hard cache flush for major upgrade * Update upgrade Fix syntax * Update upgrade Use ynh_secure_remove * Update upgrade Remove local.yaml for major version upgrade * Update upgrade No loading from cache for major upgrade * Update upgrade Do full replace for setup sources when major upgrade * Update upgrade Fix full_replace arg * Update upgrade cleaning * Update upgrade Remove obsolete source_id --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org>
This commit is contained in:
parent
030b732c82
commit
3874a1bbf4
4 changed files with 16 additions and 14 deletions
|
@ -51,7 +51,7 @@ Those roles are directly managed using YunoHost permission system. User choosen
|
|||
* Official app website: <https://www.kimai.org>
|
||||
* Official admin documentation: <https://www.kimai.org/documentation/>
|
||||
* Upstream app code repository: <https://github.com/kevinpapst/kimai2>
|
||||
* YunoHost documentation for this app: <https://yunohost.org/app_kimai2>
|
||||
* YunoHost Store: <https://apps.yunohost.org/app/kimai2>
|
||||
* Report a bug: <https://github.com/YunoHost-Apps/kimai2_ynh/issues>
|
||||
|
||||
## Developer info
|
||||
|
|
|
@ -51,7 +51,7 @@ Those roles are directly managed using YunoHost permission system. User choosen
|
|||
* Site officiel de l’app : <https://www.kimai.org>
|
||||
* Documentation officielle de l’admin : <https://www.kimai.org/documentation/>
|
||||
* Dépôt de code officiel de l’app : <https://github.com/kevinpapst/kimai2>
|
||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_kimai2>
|
||||
* YunoHost Store: <https://apps.yunohost.org/app/kimai2>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/kimai2_ynh/issues>
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
security:
|
||||
providers:
|
||||
chain_provider:
|
||||
chain:
|
||||
providers: [kimai_ldap]
|
||||
firewalls:
|
||||
secured_area:
|
||||
kimai_ldap: ~
|
||||
kimai:
|
||||
user:
|
||||
registration: __REGISTRATION__
|
||||
|
|
|
@ -37,7 +37,7 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
if [ "$database" == "sqlite" ]
|
||||
then
|
||||
ynh_script_progression --message="Sqlite is not more supported by Kimai2..."
|
||||
ynh_script_progression --message="Kimai2 will be upgrade to last available version : 1.13"
|
||||
ynh_script_progression --message="Kimai2 will be upgraded to last available version : 1.13"
|
||||
if ynh_compare_current_package_version --comparison ge --version 1.17.1~ynh1
|
||||
then
|
||||
ynh_script_progression --message="Kimai2 sqlite version is already to the last available version, no upgrade will be made"
|
||||
|
@ -112,8 +112,18 @@ 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" --keep="var/invoices/ var/data/" #config/packages/local.yaml
|
||||
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"
|
||||
|
||||
# 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
|
||||
# As a full_replace (see https://www.kimai.org/documentation/updates.html) is performed keep .env file
|
||||
ynh_setup_source --dest_dir="$final_path" --keep=".env var/invoices/ var/data/" --full_replace=1
|
||||
else
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --keep="config/packages/local.yaml var/invoices/ var/data/"
|
||||
fi
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
|
@ -154,7 +164,7 @@ ynh_add_nginx_config
|
|||
ynh_script_progression --message="Building $app..." --weight=1
|
||||
|
||||
ynh_install_composer --phpversion="$YNH_PHP_VERSION" --workdir="$final_path" --install_args="--optimize-autoloader --no-interaction"
|
||||
ynh_composer_exec --phpversion="$YNH_PHP_VERSION" --workdir="$final_path" --commands="require laminas/laminas-ldap"
|
||||
ynh_composer_exec --phpversion="$YNH_PHP_VERSION" --workdir="$final_path" --commands="require laminas/laminas-ldap --optimize-autoloader"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
|
|
Loading…
Add table
Reference in a new issue