diff --git a/scripts/install b/scripts/install index 58d15fd..f03e6f1 100644 --- a/scripts/install +++ b/scripts/install @@ -68,11 +68,7 @@ ynh_script_progression --message="Installing dependencies..." --weight=15 ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies -# tempdir="$(mktemp -d)" -# ynh_setup_source --dest_dir=$tempdir --source_id=crystal -# ynh_exec_warn_less dpkg -i $tempdir/crystal_1.0.0-1_amd64.deb - -ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=nightly +ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=stable #================================================= # CREATE DEDICATED USER diff --git a/scripts/restore b/scripts/restore index 25557fa..4b41556 100644 --- a/scripts/restore +++ b/scripts/restore @@ -79,7 +79,7 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=7 # Define and install dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies -curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=nightly +ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=stable #================================================= # RESTORE THE POSTGRESQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 6ffa7dc..996076f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,6 +74,15 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - # Create a dedicated user (if not existing) ynh_system_user_create --username=$app --home_dir="$final_path" +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=8 + +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies + +ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=stable + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -82,25 +91,14 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=5 - #tmpdir="$(mktemp -d)" - - # Backup the config file in the temp dir - #cp -a "$final_path/config/config.yml" "$tmpdir/config.yml" - pushd $final_path git fetch #git checkout master git reset --hard --quiet $version_commit git pull - shards update && shards install - crystal build $final_path/src/invidious.cr --release + ynh_exec_warn_less shards update && shards install + ynh_exec_warn_less crystal build $final_path/src/invidious.cr --release popd - - # Copy the admin saved settings from tmp directory to final path - #cp -a "$tmpdir/config.yml" "$final_path/config/config.yml" - - # Remove the tmp directory securely - #ynh_secure_remove --file="$tmpdir" fi chmod 750 "$final_path" @@ -115,15 +113,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated nginx config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=8 - -ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies - -curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=nightly - #================================================= # MODIFY A CONFIG FILE #=================================================