From 1c4abec6ad47da7436b97b725de341e7d13d8e0b Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 30 Jan 2023 15:51:29 +0100 Subject: [PATCH] Testing Git + update --- conf/app.src | 7 ------- scripts/_common.sh | 2 ++ scripts/install | 6 +++++- scripts/upgrade | 5 +++-- 4 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 conf/app.src diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index 649cbe2..0000000 --- a/conf/app.src +++ /dev/null @@ -1,7 +0,0 @@ -SOURCE_URL=https://github.com/bookwyrm-social/bookwyrm/archive/refs/tags/v0.5.3.tar.gz -SOURCE_SUM=41E263369BB3E0ED23AF6D6E112BD35EDE082BD5BECFE1BE9BBA152E47EE4E86 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= -SOURCE_EXTRACT=true diff --git a/scripts/_common.sh b/scripts/_common.sh index 2bccbe6..4dcb681 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,8 @@ # COMMON VARIABLES #================================================= +COMMIT="cad83a339ea53cd50aed9aa45a85e9f5b6443b64" + # dependencies used by the app pkg_dependencies="postgresql postgresql-contrib python3-venv libpq-dev" diff --git a/scripts/install b/scripts/install index defe995..7b3a2a2 100755 --- a/scripts/install +++ b/scripts/install @@ -98,8 +98,12 @@ ynh_psql_setup_db --db_user=$db_user --db_name=$db_name ynh_script_progression --message="Setting up source files..." --weight=1 ynh_app_setting_set --app=$app --key=final_path --value=$final_path +# Note: We use git instead of ynh_setup_source, cause this repo use submodules +git clone https://github.com/bookwyrm-social/bookwyrm.git "$final_path" --quiet -ynh_setup_source --dest_dir="$final_path" +pushd "$final_path" + git checkout $COMMIT +popd chmod 750 "$final_path" chmod -R o-rwx "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index 88ea9ff..b6f1812 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -77,8 +77,9 @@ then # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" --keep=".env" - ynh_exec_warn_less ynh_exec_as $app ./bw-dev update - ynh_exec_warn_less ynh_exec_as $app ./bw-dev populate_streams + pushd "$final_path" + ./bw-dev update + popd fi