1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pixelfed_ynh.git synced 2024-09-03 20:06:04 +02:00

Merge pull request #159 from YunoHost-Apps/new-PF-version

v0.11.2 + change php version to 7.4
This commit is contained in:
lapineige 2022-01-18 19:15:31 +01:00 committed by GitHub
commit fac0592dcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 29 additions and 22 deletions

View file

@ -24,7 +24,7 @@ In addition to taking over the functionality of Instagram, the functioning of Pi
It is also possible to import your data from Instagram.
**Shipped version:** 0.11.1~ynh2
**Shipped version:** 0.11.2~ynh1

View file

@ -21,7 +21,7 @@ En plus de reprendre les fonctionnalités d'Instagram, le fonctionnement de Pixe
Il est également possible d'importer ses données depuis Instagram.
**Version incluse :** 0.11.1~ynh2
**Version incluse :** 0.11.2~ynh1

View file

@ -32,6 +32,8 @@
upgrade=1 from_commit=c7181d1c7cb6cba53bb65e622c78b0309a53b76a
# 0.11.0~ynh2
upgrade=1 from_commit=d85b0b112afd19313dbf4cfba954e255789dfb88
# 0.11.1~ynh2
upgrade=1 from_commit=f8ecb9a95fe6430fb9d93ca674e4f0d475ecd332
backup_restore=1
multi_instance=1
port_already_use=0
@ -58,3 +60,5 @@ Notification=all
name=0.11.0~ynh1
; commit=d85b0b112afd19313dbf4cfba954e255789dfb88
name=0.11.0~ynh2
; commit=f8ecb9a95fe6430fb9d93ca674e4f0d475ecd332
name=0.11.1~ynh2

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/pixelfed/pixelfed/archive/v0.11.1.tar.gz
SOURCE_SUM=132dfceac3c0ea27dd54198d145d2d84f1714b4aa333c8b6f5141d259a77e9cb
SOURCE_URL=https://github.com/pixelfed/pixelfed/archive/v0.11.2.tar.gz
SOURCE_SUM=04eca99fa8a725ae97cf01ad8c8b26b28f02a2b579dcff9320a172433afe0de2
OURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -6,7 +6,7 @@
"en": "ActivityPub Federated Image Sharing",
"fr": "Logiciel de partage d'image fédéré via ActivityPub"
},
"version": "0.11.1~ynh2",
"version": "0.11.2~ynh1",
"url": "https://pixelfed.org/",
"upstream": {
"license": "AGPL-3.0-or-later",

View file

@ -4,11 +4,13 @@
# COMMON VARIABLES
#=================================================
YNH_PHP_VERSION="7.3"
YNH_PHP_VERSION="7.4"
YNH_COMPOSER_VERSION="2.1.5"
pkg_dependencies="postgresql libgd3 jpegoptim optipng pngquant ffmpeg imagemagick supervisor php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-ctype php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-exif php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-iconv php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-tokenizer php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-pdo php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-imagick"
pkg_dependencies="postgresql libgd3 jpegoptim optipng pngquant ffmpeg imagemagick supervisor"
extra_php_dependencies="php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-ctype php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-exif php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-iconv php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-tokenizer php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-pdo php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-imagick"
#=================================================
# PERSONAL HELPERS

View file

@ -89,7 +89,7 @@ ynh_app_config_validate() {
ynh_app_config_apply() {
_ynh_app_config_apply
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies"
}
ynh_app_config_run $1

View file

@ -115,7 +115,7 @@ ynh_add_nginx_config
ynh_script_progression --message="Configuring PHP-FPM..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================

View file

@ -74,16 +74,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring PHP-FPM configuration..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
#=================================================
# SPECIFIC RESTORATION
#=================================================
@ -94,6 +84,17 @@ ynh_script_progression --message="Reinstalling dependencies..."
# Define and install dependencies
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring PHP-FPM configuration..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# RESTORE THE POSTGRESQL DATABASE
#=================================================

View file

@ -25,7 +25,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
app_key=$(ynh_app_setting_get --app=$app --key=app_key)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
redis_db=$(ynh_app_setting_get --app=$app --key=redis_db)
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
@ -186,7 +185,8 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
ynh_script_progression --message="Upgrading PHP-FPM configuration..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# SPECIFIC UPGRADE
@ -195,7 +195,7 @@ ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_
#=================================================
ynh_script_progression --message="Updating composer dependencies..."
ynh_exec_warn_less ynh_composer_exec --phpversion="$phpversion" --workdir="$final_path" --commands="update"
ynh_exec_warn_less ynh_composer_exec --workdir="$final_path" --commands="update"
#=================================================
# UPDATE A CONFIG FILE