From 615ca52d4621f18f6dd81496afe36ee5749ec558 Mon Sep 17 00:00:00 2001 From: Amo Date: Tue, 25 May 2021 21:12:51 +0530 Subject: [PATCH] Updated to v5.5.11 --- README.md | 2 +- check_process | 3 +-- conf/app.src | 4 ++-- manifest.json | 2 +- scripts/install | 8 ++++---- scripts/upgrade | 28 ++++++++++++++++++---------- 6 files changed, 27 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 297dae7..9f3de18 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview "Firefly III" is a (self-hosted) manager for your personal finances. It can help you keep track of your expenses and income, so you can spend less and save more. Firefly III supports the use of budgets, categories and tags. It can import data from external sources and it has many neat financial reports available. You can [read all about it in the main repository](https://github.com/firefly-iii/firefly-iii) and in the [official documentation](https://firefly-iii.readthedocs.io/en/latest/). -**Shipped version:** 5.4.6 +**Shipped version:** 5.5.11 ## Screenshots diff --git a/check_process b/check_process index 1ecfc80..7eab0b5 100644 --- a/check_process +++ b/check_process @@ -15,8 +15,7 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=231c5e281e9cafabd35d4a6ef3c27fec6f3c470f - backup_restore=1 + upgrade=1 from_commit=5ee628f58c4f9ea6b6fd48d843453c47ed3d34e4 backup_restore=1 multi_instance=1 port_already_use=0 change_url=0 diff --git a/conf/app.src b/conf/app.src index 663684a..8d7c87f 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/firefly-iii/firefly-iii/archive/5.4.6.tar.gz -SOURCE_SUM=ff78e16c022662c0e0c29fa4092928257fedcf17d1801e0582191cfcd631e6a9 +SOURCE_URL=https://github.com/firefly-iii/firefly-iii/archive/refs/tags/5.5.11.tar.gz +SOURCE_SUM=f98c28a8fa6800ce0f6a92e6de0ce4e58d363972590010fac736163fbf166983 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index b6c5e74..7d771e9 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Self-hosted financial manager.", "fr": "Gestionnaire de finances personnelles." }, - "version": "5.4.6~ynh2", + "version": "5.5.11~ynh2", "url": "https://firefly-iii.org/", "license": "GPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index 6c75f8b..c2ef0ed 100755 --- a/scripts/install +++ b/scripts/install @@ -72,11 +72,11 @@ ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." +ynh_script_progression --message="Cloning Firefly-iii..." ynh_app_setting_set --app=$app --key=final_path --value=$final_path -# Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path" + +git clone https://github.com/firefly-iii/firefly-iii.git $final_path #================================================= # NGINX CONFIGURATION @@ -130,7 +130,7 @@ ynh_replace_string --match_string="MAIL_HOST=null" --replace_string="MAIL_HOST=1 ynh_replace_string --match_string="MAIL_PORT=2525" --replace_string="MAIL_PORT=25" --target_file="$config" ynh_replace_string --match_string="mail@example.com" --replace_string="$email" --target_file="$config" ynh_replace_string --match_string="changeme@example.com" --replace_string="$app@$domain" --target_file="$config" -# These helpers are for reference to impliment remove them once app gets support for LDAP. Put them directly in .env +# These helpers are for reference purpose.Uncomment them once app gets support for LDAP. Put them directly in .env # ynh_replace_string --match_string="ADLDAP_CONTROLLERS=" --replace_string="ADLDAP_CONTROLLERS=127.0.0.1" --target_file="$config" # ynh_replace_string --match_string='ADLDAP_BASEDN=""' --replace_string='ADLDAP_BASEDN="dc=yunohost,dc=org"' --target_file="$config" diff --git a/scripts/upgrade b/scripts/upgrade index ccac2ed..3cedf8b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -89,30 +89,38 @@ ynh_abort_if_errors if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Upgrading source files..." + if [ `cd $final_path && git rev-parse --is-inside-work-tree` ]; + then + pushd "$final_path" + git pull + ynh_secure_remove bootstrap/cache/* + ynh_secure_remove vendor/ + popd + else + ynh_script_progression --message="Upgrading source files..." + # Create a temporary directory + tmpdir="$(mktemp -d)" - # Create a temporary directory - tmpdir="$(mktemp -d)" - - # Backup the config file in the temp dir + # Backup the config file in the temp dir mkdir -p "$tmpdir/storage/upload" mkdir -p "$tmpdir/storage/export" mkdir -p "$final_path/storage/upload/" mkdir -p "$final_path/storage/export/" - cp -a "$final_path/storage/upload/" "$tmpdir/storage/upload/" + cp -a "$final_path/storage/upload/*" "$tmpdir/storage/upload/" cp -a "$final_path/.env" "$tmpdir/.env" - cp -a "$final_path/storage/export/" "$tmpdir/storage/export/" + cp -a "$final_path/storage/export/*" "$tmpdir/storage/export/" ynh_secure_remove --file="$final_path" # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" - + ynh_secure_remove bootstrap/cache/* # Restore the config file - cp -a "$tmpdir/storage/upload/" "$final_path/storage/upload/" - cp -a "$tmpdir/storage/export/" "$final_path/storage/export/" + cp -a "$tmpdir/storage/upload/*" "$final_path/storage/upload/." + cp -a "$tmpdir/storage/export/*" "$final_path/storage/export/." cp -a "$tmpdir/.env" "$final_path/.env" # Remove temporary directory ynh_secure_remove --file="$tmpdir" + fi fi #=================================================