diff options
| author | yalh76 <yalh@yahoo.com> | 2024-12-29 22:51:19 +0100 |
|---|---|---|
| committer | yalh76 <yalh@yahoo.com> | 2024-12-29 22:51:19 +0100 |
| commit | e071d0c0df548925a54385c809d52f916bbe74e2 (patch) | |
| tree | 1eb90d1a1219a46498a3c2872b9b3ccdca7c89a1 /scripts/upgrade | |
| parent | d3cb68ee5ca50f2d4edb7183a36dcaf47b731df1 (diff) | |
| download | mastodon_ynh-e071d0c0df548925a54385c809d52f916bbe74e2.tar.gz mastodon_ynh-e071d0c0df548925a54385c809d52f916bbe74e2.tar.bz2 mastodon_ynh-e071d0c0df548925a54385c809d52f916bbe74e2.zip | |
Fix upgrade
Diffstat (limited to 'scripts/upgrade')
| -rw-r--r-- | scripts/upgrade | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/scripts/upgrade b/scripts/upgrade index 10e37c9..531c766 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -97,18 +97,12 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression "Upgrading source files..." -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 +# Download, check integrity, uncompress and patch the source from manifest.toml +ynh_setup_source --dest_dir="$install_dir/live" --full_replace=1 --keep="public/system .env.production" - # Download Mastodon - ynh_setup_source --dest_dir="$install_dir/live" --keep="public/system/" - - chmod 750 "$install_dir" - chmod -R o-rwx "$install_dir" - chown -R $app:www-data "$install_dir" -fi +chown -R $app:www-data "$install_dir" #================================================= # BUILD ASSETS @@ -193,7 +187,6 @@ ynh_script_progression --message="Applying migrations..." --weight=1 pushd "$install_dir/live" ynh_use_ruby ynh_exec_warn_less ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails db:migrate --quiet - ynh_exec_warn_less ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails assets:clean --quiet ynh_exec_warn_less ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails assets:precompile --quiet popd |
