From 5cef9c313c6f20d444d71e2cc05856f28f87b220 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Sat, 28 Jan 2023 23:42:59 +0100 Subject: [PATCH 01/14] Upgrade --- scripts/upgrade | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index f9d2ad2..88ea9ff 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -77,6 +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 + fi chmod 750 "$final_path" @@ -99,6 +102,7 @@ mkdir "$final_path/venv" python3 -m venv "$final_path/venv" $final_path/venv/bin/pip3 install -r "$final_path/requirements.txt" + #================================================= # SET PERMISSIONS ON BOOKWYRM DIRECTORY #================================================= 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 02/14] 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 From 186e7fd6f80e5f178bcba6674d25568363448e07 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 30 Jan 2023 19:02:09 +0100 Subject: [PATCH 03/14] Add app.src --- conf/app.src | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 conf/app.src diff --git a/conf/app.src b/conf/app.src new file mode 100644 index 0000000..649cbe2 --- /dev/null +++ b/conf/app.src @@ -0,0 +1,7 @@ +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 From 21b4fc790c67af5a76acc9a3a2bdf5e6d1d596d9 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 30 Jan 2023 20:11:01 +0100 Subject: [PATCH 04/14] Fix app.src --- conf/app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index 649cbe2..63b0145 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/bookwyrm-social/bookwyrm/archive/refs/tags/v0.5.3.tar.gz -SOURCE_SUM=41E263369BB3E0ED23AF6D6E112BD35EDE082BD5BECFE1BE9BBA152E47EE4E86 +SOURCE_URL=https://github.com/bookwyrm-social/bookwyrm/archive/refs/tags/v0.5.4.tar.gz +SOURCE_SUM=593D257E5DB8518A6204B8E3A0D212A2844F0091C7FF403D89D7CBC01C8066B0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true From 3c5b00e8699b375c4e622b954081fe0bc7143fc4 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 30 Jan 2023 21:06:12 +0100 Subject: [PATCH 05/14] Fix upgrade --- scripts/upgrade | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index b6f1812..df37377 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -78,6 +78,9 @@ then # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" --keep=".env" pushd "$final_path" + git checkout production + git pull --quiet + git checkout $COMMIT ./bw-dev update popd From 95ea146b23714aaf85e59f93f6998487971183e1 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 30 Jan 2023 21:53:55 +0100 Subject: [PATCH 06/14] Fix update 0.5.4 --- check_process | 3 ++- scripts/_common.sh | 2 -- scripts/install | 6 +----- scripts/upgrade | 7 ------- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/check_process b/check_process index 1a5eefe..23fedde 100644 --- a/check_process +++ b/check_process @@ -12,7 +12,8 @@ setup_private=1 setup_public=1 upgrade=1 - #upgrade=1 from_commit=CommitHash + # 0.5.3ynh1 + upgrade=1 from_commit=ac72525a476648c6ccc9d9b52d68fdbd638b1d31 backup_restore=1 multi_instance=0 change_url=0 diff --git a/scripts/_common.sh b/scripts/_common.sh index 4dcb681..2bccbe6 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,8 +4,6 @@ # 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 7b3a2a2..defe995 100755 --- a/scripts/install +++ b/scripts/install @@ -98,12 +98,8 @@ 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 -pushd "$final_path" - git checkout $COMMIT -popd +ynh_setup_source --dest_dir="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index df37377..5440159 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -77,13 +77,6 @@ then # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" --keep=".env" - pushd "$final_path" - git checkout production - git pull --quiet - git checkout $COMMIT - ./bw-dev update - popd - fi chmod 750 "$final_path" From 3eda545999b6d3bc0fd0754d0971579aaaa2e01f Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 30 Jan 2023 22:34:34 +0100 Subject: [PATCH 07/14] Fix upgrade --- check_process | 7 +++++-- conf/app.src | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/check_process b/check_process index 23fedde..91aaf23 100644 --- a/check_process +++ b/check_process @@ -12,11 +12,14 @@ setup_private=1 setup_public=1 upgrade=1 - # 0.5.3ynh1 - upgrade=1 from_commit=ac72525a476648c6ccc9d9b52d68fdbd638b1d31 + # 0.5.4ynh1 + upgrade=1 from_commit=2292d0d68f5ba9e48f4cbb6105db64b4da4eba74 backup_restore=1 multi_instance=0 change_url=0 ;;; Options Email=oufmilo@protonmail.com Notification=all +;;; Upgrade options + ; commit=2292d0d68f5ba9e48f4cbb6105db64b4da4eba74 + name=0.5.4~ynh1 \ No newline at end of file diff --git a/conf/app.src b/conf/app.src index 63b0145..649cbe2 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/bookwyrm-social/bookwyrm/archive/refs/tags/v0.5.4.tar.gz -SOURCE_SUM=593D257E5DB8518A6204B8E3A0D212A2844F0091C7FF403D89D7CBC01C8066B0 +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 From db4f164422570a440969d283c345ef43294a7b32 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 30 Jan 2023 22:41:47 +0100 Subject: [PATCH 08/14] Fix install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index defe995..54de061 100755 --- a/scripts/install +++ b/scripts/install @@ -98,7 +98,7 @@ 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 - +# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" chmod 750 "$final_path" From 2685d8266279a6047c2a876e51c4b1e564d2d8ed Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 30 Jan 2023 23:10:10 +0100 Subject: [PATCH 09/14] Fix check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 91aaf23..af0772e 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,7 @@ setup_public=1 upgrade=1 # 0.5.4ynh1 - upgrade=1 from_commit=2292d0d68f5ba9e48f4cbb6105db64b4da4eba74 + # upgrade=1 from_commit=2292d0d68f5ba9e48f4cbb6105db64b4da4eba74 backup_restore=1 multi_instance=0 change_url=0 From 221488fce143ccb068a65498a854cf2bb4405ea1 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 30 Jan 2023 23:14:15 +0100 Subject: [PATCH 10/14] Fix app.src + check_process --- check_process | 6 +++--- conf/app.src | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/check_process b/check_process index af0772e..0d5791b 100644 --- a/check_process +++ b/check_process @@ -12,8 +12,8 @@ setup_private=1 setup_public=1 upgrade=1 - # 0.5.4ynh1 - # upgrade=1 from_commit=2292d0d68f5ba9e48f4cbb6105db64b4da4eba74 + # 0.5.3ynh1 + upgrade=1 from_commit=2292d0d68f5ba9e48f4cbb6105db64b4da4eba74 backup_restore=1 multi_instance=0 change_url=0 @@ -22,4 +22,4 @@ Email=oufmilo@protonmail.com Notification=all ;;; Upgrade options ; commit=2292d0d68f5ba9e48f4cbb6105db64b4da4eba74 - name=0.5.4~ynh1 \ No newline at end of file + name=0.5.3~ynh1 \ No newline at end of file diff --git a/conf/app.src b/conf/app.src index 649cbe2..63b0145 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/bookwyrm-social/bookwyrm/archive/refs/tags/v0.5.3.tar.gz -SOURCE_SUM=41E263369BB3E0ED23AF6D6E112BD35EDE082BD5BECFE1BE9BBA152E47EE4E86 +SOURCE_URL=https://github.com/bookwyrm-social/bookwyrm/archive/refs/tags/v0.5.4.tar.gz +SOURCE_SUM=593D257E5DB8518A6204B8E3A0D212A2844F0091C7FF403D89D7CBC01C8066B0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true From 25194343416bde627438ffbb9d24e0bbc3fdf227 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Fri, 3 Feb 2023 21:23:00 +0100 Subject: [PATCH 11/14] Fix app.src --- conf/app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index 63b0145..1e6ed74 100644 --- a/conf/app.src +++ b/conf/app.src @@ -4,4 +4,4 @@ SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true SOURCE_FILENAME= -SOURCE_EXTRACT=true +SOURCE_EXTRACT=true \ No newline at end of file From ea612479432fffbc6d4e0f044293b45fc4504807 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Fri, 3 Feb 2023 21:41:33 +0100 Subject: [PATCH 12/14] Fix app.src --- conf/app.src | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index 1e6ed74..3a57150 100644 --- a/conf/app.src +++ b/conf/app.src @@ -3,5 +3,4 @@ SOURCE_SUM=593D257E5DB8518A6204B8E3A0D212A2844F0091C7FF403D89D7CBC01C8066B0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= SOURCE_EXTRACT=true \ No newline at end of file From 307858d9f3df59f6524e70ea101c65217667e11d Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Fri, 3 Feb 2023 22:41:43 +0100 Subject: [PATCH 13/14] Fix --- conf/app.src | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index 3a57150..26b6346 100644 --- a/conf/app.src +++ b/conf/app.src @@ -2,5 +2,4 @@ SOURCE_URL=https://github.com/bookwyrm-social/bookwyrm/archive/refs/tags/v0.5.4. SOURCE_SUM=593D257E5DB8518A6204B8E3A0D212A2844F0091C7FF403D89D7CBC01C8066B0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_EXTRACT=true \ No newline at end of file +SOURCE_IN_SUBDIR=true \ No newline at end of file From c8bd6444dcca828eb9569cd6ad097cb40e3734b9 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Fri, 3 Feb 2023 23:08:15 +0100 Subject: [PATCH 14/14] Fix source_sum --- conf/app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index 26b6346..153b1ed 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ SOURCE_URL=https://github.com/bookwyrm-social/bookwyrm/archive/refs/tags/v0.5.4.tar.gz -SOURCE_SUM=593D257E5DB8518A6204B8E3A0D212A2844F0091C7FF403D89D7CBC01C8066B0 +SOURCE_SUM=2DAFDCF26DE6C041611D16ED48B751CF8D4DFBEE1F5CF4AA5975592BC080261D SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true \ No newline at end of file