1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bookstack_ynh.git synced 2024-09-03 18:16:02 +02:00
* Upgrade to version 0.31.6
This commit is contained in:
Éric Gaspar 2021-03-02 22:02:17 +01:00 committed by GitHub
parent 6c6aaf0182
commit 9498a104cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 34 additions and 34 deletions

View file

@ -13,7 +13,7 @@ BookStack is a simple, self-hosted, easy-to-use platform for organising and stor
BookStack is built using PHP, on top of the Laravel framework and it uses MySQL to store data. BookStack is built using PHP, on top of the Laravel framework and it uses MySQL to store data.
**Shipped version:** 0.31.5 **Shipped version:** 0.31.6
## Screenshots ## Screenshots

View file

@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install
## Overview ## Overview
BookStack est une plate-forme simple, auto-hébergée et facile à utiliser pour organiser et stocker des informations. BookStack est une plate-forme simple, auto-hébergée et facile à utiliser pour organiser et stocker des informations.
**Version incluse :** 0.31.5 **Version incluse :** 0.31.6
## Screenshots ## Screenshots

View file

@ -15,6 +15,7 @@
setup_private=1 setup_private=1
setup_public=1 setup_public=1
upgrade=1 upgrade=1
upgrade=1 from_commit=a1db7396ceab19640e68d6a8cc05befd1f9c07ad
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
port_already_use=0 port_already_use=0
@ -22,3 +23,8 @@
;;; Options ;;; Options
Email= Email=
Notification=none Notification=none
;;; Upgrade options
; commit=a1db7396ceab19640e68d6a8cc05befd1f9c07ad
name=Testing (#11)
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/BookStackApp/BookStack/archive/v0.31.5.tar.gz SOURCE_URL=https://github.com/BookStackApp/BookStack/archive/v0.31.6.tar.gz
SOURCE_SUM=76e46d9d481f6aabc47c86ec4dac9218b5a927ab1930933758943168009f545e SOURCE_SUM=6c6a0d57a9ca824d9556720ea976d90fdba62c74dfb08be2c020e5dd5dd1288e
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -6,7 +6,7 @@
"en": "Platform to create documentation/wiki content", "en": "Platform to create documentation/wiki content",
"fr": "Plateforme pour créer du contenu de documentation/wiki " "fr": "Plateforme pour créer du contenu de documentation/wiki "
}, },
"version": "0.31.5~ynh1", "version": "0.31.6~ynh1",
"url": "https://www.bookstackapp.com/", "url": "https://www.bookstackapp.com/",
"license": "MIT", "license": "MIT",
"maintainer": { "maintainer": {

View file

@ -103,15 +103,8 @@ ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_ar
# MODIFY A CONFIG FILE # MODIFY A CONFIG FILE
#================================================= #=================================================
cp -a ../conf/.env.example $final_path/.env mail_pwd=$(ynh_string_random --length=12)
ynh_add_config --template=../conf/.env.example --destination=$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_PWD__" --replace_string="$db_pwd" --target_file="$final_path/.env"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/.env"
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$final_path/.env"
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/.env"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/.env"
ynh_replace_string --match_string="__MAIL_PWD__" --replace_string="$(ynh_string_random --length=12)" --target_file="$final_path/.env"
ynh_store_file_checksum $final_path/.env ynh_store_file_checksum $final_path/.env

View file

@ -53,8 +53,23 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
# Create a temporary directory
tmpdir="$(mktemp -d)"
# Backup the config file in the temp dir
cp -a "$final_path/.env" "$tmpdir/.env"
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" ynh_setup_source --dest_dir="$final_path"
# Copy the admin saved settings from tmp directory to final path
cp -a "$tmpdir/.env" "$final_path/.env"
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
fi fi
#================================================= #=================================================
@ -82,36 +97,22 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
ynh_add_fpm_config --package="$extra_php_dependencies" ynh_add_fpm_config --package="$extra_php_dependencies"
#================================================= #=================================================
# PHP-FPM CONFIGURATION # INSTALL LYCHEE WITH COMPOSER
#================================================= #=================================================
ynh_script_progression --message="Upgrading Composer..." --weight=1 ynh_script_progression --message="Installing BookStack with Composer..." --weight=5
# Install composer
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"
#=================================================
# MODIFY A CONFIG FILE
#=================================================
cp -a ../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_PWD__" --replace_string="$db_pwd" --target_file="$final_path/.env"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/.env"
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$final_path/.env"
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/.env"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/.env"
ynh_replace_string --match_string="__MAIL_PWD__" --replace_string="$(ynh_string_random --length=12)" --target_file="$final_path/.env"
ynh_store_file_checksum $final_path/.env
#================================================= #=================================================
# FINAL BOOKSTACK INSTALL # FINAL BOOKSTACK INSTALL
#================================================= #=================================================
ynh_script_progression --message="Install BookStack" --weight=5 ynh_script_progression --message="Install BookStack" --weight=5
pushd $final_path pushd $final_path
php$phpversion artisan key:generate --no-interaction --force php artisan migrate --no-interaction \
php$phpversion artisan migrate --no-interaction --force && php artisan cache:clear --no-interaction \
&& php artisan view:clear --no-interaction
popd popd
#================================================= #=================================================