From 652c1da559db639c32efbdf3805ca94f6f3434f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 19 Apr 2021 09:59:07 +0200 Subject: [PATCH] 4.3 (#22) * upgrade to 4.3 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- scripts/install | 28 ++++++++++------------------ scripts/restore | 4 ++-- scripts/upgrade | 9 ++++++--- 7 files changed, 23 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 27fe87e..83ec260 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview Lychee is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -**Shipped version:** 4.2.2 +**Shipped version:** 4.3 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 375a413..3ec9d46 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install ## Vue d'ensemble Lychee est un outil de gestion de photos gratuit, qui fonctionne sur votre serveur ou votre espace Web. L'installation est une question de secondes. Téléchargez, gérez et partagez des photos comme à partir d'une application native. Lychee est livré avec tout ce dont vous avez besoin et toutes vos photos sont stockées en toute sécurité. -**Version incluse :** 4.2.2 +**Version incluse :** 4.3 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index 62993e9..7c85370 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/LycheeOrg/Lychee/releases/download/v4.2.2/Lychee.zip -SOURCE_SUM=9d570abb980d8ad5529eaab235a8dd71586a805e48f532357a390384bab0c38b +SOURCE_URL=https://github.com/LycheeOrg/Lychee/releases/download/v4.3.0/Lychee.zip +SOURCE_SUM=4d9afdafb3d6711e85779377ebde523d7ef0a5bf3aea6ff7ca29ef6058536184 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 5a8df68..d4f0f39 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Photo-management-system to manage and share photos.", "fr": "Système de gestion de photos pour gérer et partager des photos." }, - "version": "4.2.2~ynh1", + "version": "4.3~ynh1", "url": "https://lycheeorg.github.io/", "license": "MIT", "maintainer": { diff --git a/scripts/install b/scripts/install index df9f4dd..2680a41 100755 --- a/scripts/install +++ b/scripts/install @@ -61,6 +61,14 @@ db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=2 + +# Create a system user +ynh_system_user_create --username=$app + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -88,14 +96,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config "public_path" -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=2 - -# Create a system user -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -110,8 +110,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Installing Lychee with Composer..." --weight=15 -# Install composer -ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_args="--prefer-source --no-dev" +ynh_install_composer --install_args="--ignore-platform-reqs" #================================================= # BUILDING @@ -132,13 +131,6 @@ popd # Setup custom user.css file cp ../conf/user.css.example $final_path/public/dist/user.css -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= - -# Calculate and store the config file checksum into the app settings -ynh_store_file_checksum "$final_path/.env" - #================================================= # SECURE FILES AND DIRECTORIES #================================================= @@ -147,7 +139,7 @@ ynh_store_file_checksum "$final_path/.env" chown -R $app: $final_path chmod 750 $final_path/bootstrap/cache chown -R $app: $public_path -chmod 750 $public_path +chmod 755 $public_path #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index a8f46fd..a086dc1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -77,9 +77,9 @@ ynh_restore_file --origin_path="$public_path" --not_mandatory # Set permissions to app files chown -R $app: $final_path -chmod -R 750 $final_path/bootstrap/cache +chmod 750 $final_path/bootstrap/cache chown -R $app: $public_path -chmod -R 750 $public_path +chmod 755 $public_path #================================================= # REINSTALL DEPENDENCIES diff --git a/scripts/upgrade b/scripts/upgrade index 4df9aff..b8e5cea 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -95,6 +95,9 @@ then # Backup the config file in the temp dir cp -a "$final_path/public/dist/user.css" "$tmpdir/user.css" + # Move media to new path + cp -a "$final_path/public/uploads" "$public_path/uploads" + # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -147,7 +150,8 @@ ynh_script_progression --message="Installing Composer..." --weight=1 #ynh_secure_remove --file="$final_path/composer.lock" # Upgrade composer itself -ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_args="--prefer-source --no-dev" +#ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_args="--prefer-source --no-dev" +ynh_install_composer --install_args="--ignore-platform-reqs" #================================================= # SETUP APPLICATION CONFIG @@ -165,7 +169,6 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading Lychee source files..." --weight=4 pushd $final_path - composer install --no-dev php$phpversion artisan key:generate --no-interaction --force php$phpversion artisan migrate --no-interaction --force popd @@ -179,7 +182,7 @@ fi chown -R $app: $final_path chmod 750 $final_path/bootstrap/cache chown -R $app: $public_path -chmod 750 $public_path +chmod 755 $public_path #================================================= # RELOAD NGINX