From 2fd06d45ead1aedbdd5cc1131163f2df87361d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 29 Jul 2021 23:38:52 +0200 Subject: [PATCH] Testing (#47) * From git commit (#46) --- README.md | 4 ++-- README_fr.md | 4 ++-- conf/app.src | 0 doc/DISCLAIMER.md | 2 +- doc/DISCLAIMER_fr.md | 2 +- manifest.json | 2 +- scripts/_common.sh | 2 ++ scripts/install | 4 ++++ scripts/upgrade | 7 +++---- 9 files changed, 16 insertions(+), 11 deletions(-) delete mode 100644 conf/app.src diff --git a/README.md b/README.md index c5a4180..e87327e 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Alternative front-end to YouTube -**Shipped version:** 0.20.1~ynh11 +**Shipped version:** 28.07.21~ynh1 **Demo:** https://invidious.site/ @@ -29,7 +29,7 @@ Alternative front-end to YouTube ## Configuration -You can configure Invidious by modifying the configuration file `/var/www/invidious/config/config.yml` with the help of this [documentation](https://github.com/iv-org/documentation/blob/master/Configuration.md). +You can configure Invidious by modifying the configuration file `/var/www/invidious/config/config.yml` with the help of this [documentation](https://docs.invidious.io/Configuration.md). ## Limitations diff --git a/README_fr.md b/README_fr.md index 7ca6c5e..0a72f24 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Front-end alternatif à YouTube -**Version incluse :** 0.20.1~ynh11 +**Version incluse :** 28.07.21~ynh1 **Démo :** https://invidious.site/ @@ -25,7 +25,7 @@ Front-end alternatif à YouTube ## Configuration -Vous pouvez configurer Invidious en modifiant le fichier de configuration `/var/www/invidious/config/config.yaml` avec l'aide de cette [documentation](https://github.com/iv-org/documentation/blob/master/Configuration.md). +Vous pouvez configurer Invidious en modifiant le fichier de configuration `/var/www/invidious/config/config.yaml` avec l'aide de cette [documentation](https://docs.invidious.io/Configuration.md). ## Limitations diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index e69de29..0000000 diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index f5bbf45..f247f41 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,6 +1,6 @@ ## Configuration -You can configure Invidious by modifying the configuration file `/var/www/invidious/config/config.yml` with the help of this [documentation](https://github.com/iv-org/documentation/blob/master/Configuration.md). +You can configure Invidious by modifying the configuration file `/var/www/invidious/config/config.yml` with the help of this [documentation](https://docs.invidious.io/Configuration.md). ## Limitations diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index 4297635..1e8f872 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -1,6 +1,6 @@ ## Configuration -Vous pouvez configurer Invidious en modifiant le fichier de configuration `/var/www/invidious/config/config.yaml` avec l'aide de cette [documentation](https://github.com/iv-org/documentation/blob/master/Configuration.md). +Vous pouvez configurer Invidious en modifiant le fichier de configuration `/var/www/invidious/config/config.yaml` avec l'aide de cette [documentation](https://docs.invidious.io/Configuration.md). ## Limitations diff --git a/manifest.json b/manifest.json index 1bdb248..0e21726 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Alternative front-end to YouTube", "fr": "Front-end alternatif à YouTube" }, - "version": "0.20.1~ynh11", + "version": "28.07.21~ynh1", "url": "https://invidio.us/", "upstream": { "license": "GPL-3.0-only", diff --git a/scripts/_common.sh b/scripts/_common.sh index 04a4ba1..62db077 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,8 @@ # COMMON VARIABLES #================================================= +version_commit=5c76cdaad9da2330311e78fc4e451c40e88a9598 + # dependencies used by the app pkg_dependencies="apt-transport-https libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin libsqlite3-dev zlib1g-dev libevent-dev pkg-config libpcre3-dev" diff --git a/scripts/install b/scripts/install index 24c23d9..dba2426 100644 --- a/scripts/install +++ b/scripts/install @@ -101,6 +101,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from GitHub git clone https://github.com/iv-org/invidious "$final_path" --quiet +pushd "$final_path" + git reset --hard --quiet $version_commit +popd + for i in $final_path/config/sql/*.sql ; do ynh_replace_string --match_string="kemal" --replace_string=$db_user --target_file="$i" ; ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "$i" ; diff --git a/scripts/upgrade b/scripts/upgrade index e7bd86e..350fb5c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -99,12 +99,11 @@ then # Backup the config file in the temp dir #cp -a "$final_path/config/config.yml" "$tmpdir/config.yml" - # Remove the app directory securely - #ynh_secure_remove --file=$final_path - - #git clone https://github.com/iv-org/invidious "$final_path" --quiet pushd $final_path + git fetch + #git checkout master git pull + git reset --hard --quiet $version_commit shards update && shards install crystal build $final_path/src/invidious.cr --release popd