mirror of
https://github.com/YunoHost-Apps/glitchsoc_ynh.git
synced 2024-09-03 19:15:59 +02:00
Apply breaking changes documented at https://github.com/glitch-soc/mastodon/issues/2525
This commit is contained in:
parent
65cb17f87a
commit
7c3062a765
2 changed files with 19 additions and 14 deletions
|
@ -132,6 +132,7 @@ pushd "$install_dir/live"
|
||||||
# This export might be removed in yunohost 12
|
# This export might be removed in yunohost 12
|
||||||
COREPACK_ENABLE_DOWNLOAD_PROMPT=0 yarn install
|
COREPACK_ENABLE_DOWNLOAD_PROMPT=0 yarn install
|
||||||
echo "SAFETY_ASSURED=1">> "$config"
|
echo "SAFETY_ASSURED=1">> "$config"
|
||||||
|
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:encryption:init
|
||||||
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:migrate --quiet
|
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:migrate --quiet
|
||||||
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails assets:precompile --quiet
|
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails assets:precompile --quiet
|
||||||
# Generate vapid keys
|
# Generate vapid keys
|
||||||
|
|
|
@ -10,20 +10,6 @@ source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
config="$install_dir/live/.env.production"
|
config="$install_dir/live/.env.production"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
|
||||||
|
|
||||||
# Set `service` settings to support `yunohost app shell` command
|
|
||||||
if [[ -z "${service:-}" ]]; then
|
|
||||||
service="$app-web.service"
|
|
||||||
ynh_app_setting_set --app="$app" --key=service --value="$service"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#Remove previous added repository
|
|
||||||
ynh_remove_extra_repo
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STOP SYSTEMD SERVICE
|
# STOP SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -40,6 +26,24 @@ if [[ $db_name = *'_production' ]]; then
|
||||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
|
|
||||||
|
# Set `service` settings to support `yunohost app shell` command
|
||||||
|
if [[ -z "${service:-}" ]]; then
|
||||||
|
service="$app-web.service"
|
||||||
|
ynh_app_setting_set --app="$app" --key=service --value="$service"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Remove previous added repository
|
||||||
|
ynh_remove_extra_repo
|
||||||
|
|
||||||
|
if ynh_compare_current_package_version --comparison lt --version 2024.05.01~ynh1; then
|
||||||
|
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:encryption:init
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD SWAP IF NEEDED
|
# ADD SWAP IF NEEDED
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue