mirror of
https://github.com/YunoHost-Apps/glitchsoc_ynh.git
synced 2024-09-03 19:15:59 +02:00
Merge pull request #183 from YunoHost-Apps/testing
Change the way the upgrade is managed
This commit is contained in:
commit
7c299ee01c
1 changed files with 12 additions and 5 deletions
|
@ -169,13 +169,20 @@ then
|
|||
ynh_script_progression --message="Upgrading source files..." --weight=14
|
||||
|
||||
# Download Mastodon
|
||||
mv "$final_path/live" "$final_path/live_back"
|
||||
ynh_setup_source --dest_dir="$final_path/live"
|
||||
if [ -d "$final_path/live_back/public/system" ]; then
|
||||
rsync -a "$final_path/live_back/public/system" "$final_path/live/public/."
|
||||
tmpdir="$(mktemp -d)"
|
||||
|
||||
mkdir $tmpdir/system
|
||||
if [ -d "$final_path/live/public/system" ]; then
|
||||
rsync -a "$final_path/live/public/system" "$tmpdir/."
|
||||
fi
|
||||
rsync -a "$final_path/live_back/.env.production" "$final_path/live/."
|
||||
ynh_secure_remove --file="$final_path/live_back/"
|
||||
rsync -a "$final_path/live/.env.production" "$tmpdir/."
|
||||
ynh_secure_remove --file="$final_path/live/"
|
||||
ynh_setup_source --dest_dir="$final_path/live"
|
||||
if [ -d "$tmpdir/system" ]; then
|
||||
rsync -a "$tmpdir/system" "$final_path/live/public/."
|
||||
fi
|
||||
rsync -a "$tmpdir/.env.production" "$final_path/live/."
|
||||
ynh_secure_remove --file="$tmpdir/"
|
||||
|
||||
# Clean files which are not needed anymore
|
||||
ynh_secure_remove --file="$final_path/live/config/initializers/timeout.rb"
|
||||
|
|
Loading…
Reference in a new issue