From 6efd9990e2912511abf882bfd1971fd35a93b42a Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Sat, 23 Dec 2023 07:48:22 +0100 Subject: [PATCH] Fix install + manifest + upgrade --- manifest.toml | 6 +++++- scripts/install | 13 +++---------- scripts/upgrade | 12 +++--------- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/manifest.toml b/manifest.toml index 05b4042..bffbba6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Iceshrimp" description.en = "$app is a decentralized and federated social networking service, implementing the ActivityPub standard." description.fr = "$app est un service de réseau social décentralisé et fédéré, implémentant le standard ActivityPub." -version = "2023~ynh1" +version = "v2023.12.1~ynh1" maintainers = ["oufmilo"] @@ -36,6 +36,10 @@ ram.runtime = "2G" [resources] + [resources.sources.main] + url = "https://iceshrimp.dev/iceshrimp/iceshrimp/archive/v2023.12.1.tar.gz" + sha256 = "b9b59899eaddcdd94e10974e34af083bd9a9c6228046dc4d4af0f3a669ccb7ef" + [resources.system_user] [resources.install_dir] diff --git a/scripts/install b/scripts/install index 81f6094..08e3589 100755 --- a/scripts/install +++ b/scripts/install @@ -31,18 +31,11 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION #================================================= ynh_script_progression --message="Setting up source files..." --weight=3 -mkdir -p "$install_dir" +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" + chown -R $app:www-data "$install_dir" -git lfs install && git lfs pull - -# Download, check integrity, uncompress and patch the source from GitHub -git clone https://iceshrimp.dev/iceshrimp/iceshrimp.git "$install_dir" --quiet - -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - - #================================================= # NGINX CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f37b7b1..d90f523 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,17 +58,11 @@ fi #================================================= if [ "$upgrade_type" == "UPGRADE_APP" ] - then - ynh_script_progression --message="Upgrading source files..." --weight=5 + ynh_script_progression --message="Upgrading source files..." - pushd $install_dir - chown -R $app:www-data "$install_dir" - - ynh_exec_as $app git fetch - #git checkout master - ynh_exec_as $app git pull - popd + # Download, check integrity, uncompress and patch the source from app.src + ynh_setup_source --dest_dir="$install_dir" --keep=".config/default.yml" fi chmod 750 "$install_dir"