1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lychee_ynh.git synced 2024-09-03 19:36:36 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2021-01-28 15:13:26 +01:00
parent dd2de0ef5d
commit 40f7b069c2
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -108,15 +108,11 @@ then
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
ynh_install_composer --workdir="$final_path" --install_args="--prefer-source --no-dev"
ynh_install_composer --workdir="$final_path" --install_args="--no-dev"
pushd $final_path
php$phpversion artisan migrate -n --force
php$phpversion artisan migrate #-n --force
popd
ynh_backup_if_checksum_is_different --file="$final_path/.env"
# Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum --file="$final_path/.env"
fi
#=================================================
@ -150,6 +146,23 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies"
#=================================================
# BUILDING
#=================================================
ynh_script_progression --message="Building..."
ynh_backup_if_checksum_is_different --file="$final_path/.env"
# Setup application config
cp ../conf/.env.example $final_path/.env
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/.env"
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/.env"
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$final_path/.env"
ynh_replace_string --match_string="__PUBLICPATH__" --replace_string="$public_path" --target_file="$final_path/.env"
# Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum --file="$final_path/.env"
# SECURE FILES AND DIRECTORIES
#=================================================