mirror of
https://github.com/YunoHost-Apps/firefly-iii_ynh.git
synced 2024-09-03 18:36:13 +02:00
Upgrade of upgrade script
This commit is contained in:
parent
23be6e89a3
commit
b8acaaad24
1 changed files with 20 additions and 0 deletions
|
@ -7,6 +7,9 @@
|
|||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source ynh_add_extra_apt_repos__3
|
||||
source ynh_install_php__3
|
||||
source ynh_composer
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -92,14 +95,31 @@ mkdir -p "$final_path/storage/upload/"
|
|||
mkdir -p "$final_path/storage/export/"
|
||||
cp -a "$final_path/storage/upload/" "$tmpdir/storage/upload/"
|
||||
cp -a "$final_path/storage/export/" "$tmpdir/storage/export/"
|
||||
rm -Rf "$final_path"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
ynh_install_composer --phpversion="$phpversion"
|
||||
cd $final_path && php$phpversion artisan migrate:refresh --seed
|
||||
cd $final_path && php$phpversion artisan firefly-iii:upgrade-database
|
||||
cd $final_path && php$phpversion artisan passport:install
|
||||
|
||||
|
||||
rm -rf "$final_path/bootstrap/cache/*"
|
||||
|
||||
cd $final_path && php$phpversion artisan cache:clear
|
||||
cd $final_path && php$phpversion artisan migrate --seed
|
||||
cd $final_path && php$phpversion artisan firefly-iii:upgrade-database
|
||||
cd $final_path && php$phpversion artisan passport:install
|
||||
cd $final_path && php$phpversion artisan cache:clear
|
||||
|
||||
cp -a "$tmpdir/storage/upload/" "$final_path/storage/upload/"
|
||||
cp -a "$tmpdir/storage/export/" "$final_path/storage/export/"
|
||||
|
||||
# Set right permissions
|
||||
chown -R $app:$app $final_path
|
||||
chmod -R 775 ${final_path}/storage
|
||||
|
||||
#remove tmp dir
|
||||
sudo rm -Rf "$tmpdir"
|
||||
|
||||
|
|
Loading…
Reference in a new issue