From bcc532759887ea0247cdc3ca7579f5eb6c7995b1 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 21 Dec 2023 22:58:46 +0100 Subject: [PATCH] Add git clone --- manifest.toml | 4 ---- scripts/install | 19 ++++++++++++++++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/manifest.toml b/manifest.toml index 426ae19..05b4042 100644 --- a/manifest.toml +++ b/manifest.toml @@ -36,10 +36,6 @@ ram.runtime = "2G" [resources] - [resources.sources.main] - url = "https://iceshrimp.dev/iceshrimp/iceshrimp/archive/v2023.11.4.tar.gz" - sha256 = "e5918afc997f7b3513043ade77f0e3f5a222a724afd6742eed0b9128627a6712" - [resources.system_user] [resources.install_dir] diff --git a/scripts/install b/scripts/install index bc45e65..d73b1fb 100755 --- a/scripts/install +++ b/scripts/install @@ -31,11 +31,24 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION #================================================= ynh_script_progression --message="Setting up source files..." --weight=3 -# Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$install_dir" - +mkdir -p "$install_dir" chown -R $app:www-data "$install_dir" +git config --system --add safe.directory $install_dir +git lfs install + +# Download, check integrity, uncompress and patch the source from GitHub +git clone https://iceshrimp.dev/iceshrimp/iceshrimp.git "$install_dir" --quiet + +pushd "$install_dir" + git reset --hard --quiet $version_commit + make +popd + +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + + #================================================= # NGINX CONFIGURATION #=================================================