1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/firefly-iii_ynh.git synced 2024-09-03 18:36:13 +02:00
This commit is contained in:
Memo 2022-04-07 16:00:08 +02:00 committed by GitHub
commit 504cf92c7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 34 deletions

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/firefly-iii/firefly-iii/archive/refs/tags/5.6.8.tar.gz
SOURCE_SUM=a1f7e30b7fa0ded2c10271e2f9f4b61fb26e3b0d4183250e444bfea92a016609
SOURCE_URL=https://github.com/firefly-iii/firefly-iii/archive/refs/tags/5.7.1.tar.gz
SOURCE_SUM=232E52E8C7459398DB9CA449A4CE7BBF13A64A8D8B89E9FF5086B5DB81739D22
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -6,7 +6,7 @@
"en": "Self-hosted financial manager",
"fr": "Gestionnaire de finances personnelles"
},
"version": "5.6.8~ynh1",
"version": "5.7.1~ynh1",
"url": "https://firefly-iii.org/",
"upstream": {
"license": "GPL-3.0-or-later",
@ -49,6 +49,10 @@
{
"name": "is_public",
"type": "boolean",
"help": {
"en": "If enabled, firefly-III will be accessible by people who doesnt have an account. This can be changed later via the webadmin.",
"fr": "Si cette case est cochée, firefly-III sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
},
"default": true
}
]

View file

@ -6,9 +6,6 @@
# dependencies used by the app
latest_tag=$(curl -s https://api.github.com/repos/firefly-iii/firefly-iii/releases/latest | grep 'tag_name' | cut -d\" -f4)
tag="5.5.11"
YNH_PHP_VERSION="8.0"
# Composer version

View file

@ -27,7 +27,6 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
random_key=$(ynh_string_random --length=32)
email=$(ynh_user_get_info --username=$admin --key=mail)
phpversion=$YNH_PHP_VERSION
update=1
app=$YNH_APP_INSTANCE_NAME
@ -51,7 +50,6 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=random_key --value=$random_key
ynh_app_setting_set --app=$app --key=update --value=$update
ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion
#=================================================
@ -94,7 +92,7 @@ ynh_script_progression --message="Cloning Firefly-iii..."
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
git clone --quiet -b $tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path
ynh_setup_source --dest_dir=$final_path
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"

View file

@ -24,7 +24,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
random_key=$(ynh_app_setting_get --app=$app --key=random_key)
email=$(ynh_user_get_info --username=$admin --key=mail)
update=$(ynh_app_setting_get --app=$app --key=update)
phpversion=$YNH_PHP_VERSION
#=================================================
@ -90,17 +89,11 @@ then
if [ `cd $final_path && git rev-parse --is-inside-work-tree` ];
then
pushd "$final_path"
if [ $update -eq 1 ]
then
git fetch --quiet origin tag $latest_tag --no-tags
git checkout --quiet $latest_tag
else
git fetch --quiet origin tag $tag --no-tags
git checkout --quiet $tag --quiet
fi
ynh_secure_remove --file="$final_path/bootstrap/cache/*"
ynh_secure_remove --file="$final_path/vendor/"
popd
ynh_setup_source --dest_dir=$final_path
ynh_secure_remove --file="$final_path/bootstrap/cache/*"
ynh_secure_remove --file="$final_path/vendor/"
popd
else
ynh_script_progression --message="Upgrading source files..."
# Create a temporary directory
@ -117,17 +110,9 @@ then
ynh_secure_remove --file="$final_path"
# Download, check integrity, uncompress and patch the source from app.src
if [ $update -eq 1 ]
then
ynh_setup_source --dest_dir=$final_path
ynh_secure_remove bootstrap/cache/*
git clone --quiet -b $latest_tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path
else
git clone --quiet -b $tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path
fi
ynh_secure_remove bootstrap/cache/*
# Restore the config file and data
mkdir -p "$final_path/storage/upload/"
mkdir -p "$final_path/storage/export/"
@ -175,7 +160,7 @@ ynh_add_fpm_config --usage=low --footprint=low
ynh_script_progression --message="Updating PHP dependencies..."
chown -R $app $final_path
ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$final_path"
ynh_exec_warn_less ynh_install_composer
#=================================================
# MODIFY A CONFIG FILE
@ -210,6 +195,15 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
# Set permissions to app files
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# RELOAD NGINX
#=================================================