1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/invidious_ynh.git synced 2024-09-03 19:15:55 +02:00
This commit is contained in:
eric_G 2024-05-02 20:41:52 +02:00 committed by GitHub
commit 9a8b450f95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 26 additions and 63 deletions

View file

@ -27,7 +27,7 @@ In addition to constituting an advantage in terms of confidentiality (the data d
- Ability to subscribe to channels without creating a Google account - Ability to subscribe to channels without creating a Google account
**Shipped version:** 24.04.28~ynh1 **Shipped version:** 2.20240427~ynh1
**Demo:** <https://invidious.site/> **Demo:** <https://invidious.site/>

View file

@ -27,7 +27,7 @@ In addition to constituting an advantage in terms of confidentiality (the data d
- Ability to subscribe to channels without creating a Google account - Ability to subscribe to channels without creating a Google account
**Paketatutako bertsioa:** 24.04.28~ynh1 **Paketatutako bertsioa:** 2.20240427~ynh1
**Demoa:** <https://invidious.site/> **Demoa:** <https://invidious.site/>

View file

@ -26,7 +26,7 @@ En plus de constituer un avantage sur le plan de la confidentialité (les donné
- Possibilité d'afficher les commentaires Reddit plutôt que les commentaires YouTube, - Possibilité d'afficher les commentaires Reddit plutôt que les commentaires YouTube,
- Possibilité de s'abonner aux chaines sans créer de compte Google - Possibilité de s'abonner aux chaines sans créer de compte Google
**Version incluse:** 24.04.28~ynh1 **Version incluse:** 2.20240427~ynh1
**Démo:** <https://invidious.site/> **Démo:** <https://invidious.site/>

View file

@ -27,7 +27,7 @@ In addition to constituting an advantage in terms of confidentiality (the data d
- Ability to subscribe to channels without creating a Google account - Ability to subscribe to channels without creating a Google account
**Versión proporcionada:** 24.04.28~ynh1 **Versión proporcionada:** 2.20240427~ynh1
**Demo:** <https://invidious.site/> **Demo:** <https://invidious.site/>

View file

@ -27,7 +27,7 @@ In addition to constituting an advantage in terms of confidentiality (the data d
- Ability to subscribe to channels without creating a Google account - Ability to subscribe to channels without creating a Google account
**分发版本:** 24.04.28~ynh1 **分发版本:** 2.20240427~ynh1
**演示:** <https://invidious.site/> **演示:** <https://invidious.site/>

View file

@ -5,7 +5,7 @@ name = "Invidious"
description.en = "Alternative front-end to YouTube" description.en = "Alternative front-end to YouTube"
description.fr = "Front-end alternatif à YouTube" description.fr = "Front-end alternatif à YouTube"
version = "24.04.28~ynh1" version = "2.20240427~ynh1"
maintainers = [] maintainers = []
@ -48,6 +48,14 @@ ram.runtime = "50M"
default = "fr" default = "fr"
[resources] [resources]
[resources.sources.main]
url = "https://github.com/iv-org/invidious/archive/refs/tags/v2.20240427.tar.gz"
sha256 = "0f290de213eda898f95fd0108652738f88bb6d09289e0cea86c178050271660d"
autoupdate.strategy = "latest_github_release"
autoupdate.version_regex = "^v(.*)$" # v<MAJOR><dot><YYYY><MM><DD>
[resources.system_user] [resources.system_user]
[resources.install_dir] [resources.install_dir]

View file

@ -4,8 +4,6 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
version_commit=eda7444ca46dbc3941205316baba8030fe0b2989
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS
#================================================= #=================================================

View file

@ -42,23 +42,10 @@ ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- -
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Setting up source files..." --weight=4 ynh_script_progression --message="Setting up source files..." --weight=1
mkdir -p "$install_dir" # Download, check integrity, uncompress and patch the source from manifest.toml
chown -R "$app:www-data" "$install_dir" ynh_setup_source --dest_dir="$install_dir"
git config --system --add safe.directory "$install_dir"
# Download, check integrity, uncompress and patch the source from GitHub
# note: we can't use resources.sources instead of git because Invidious is
# expecting to be in a git environment for the building step...
# see: https://github.com/YunoHost-Apps/invidious_ynh/pull/127
git clone https://github.com/iv-org/invidious "$install_dir" --quiet
pushd "$install_dir"
git reset --hard --quiet "$version_commit"
make
popd
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir" chown -R "$app:www-data" "$install_dir"
@ -78,9 +65,10 @@ chown "$app:$app" "$install_dir/config/config.yml"
#================================================= #=================================================
# INSTALL INVIDIOUS # INSTALL INVIDIOUS
#================================================= #=================================================
ynh_script_progression --message="Building Invidious.. (this will take some time and resources!)" --weight=60 ynh_script_progression --message="Building Invidious... (this will take some time and resources!)" --weight=60
pushd "$install_dir" pushd "$install_dir"
make
./invidious --migrate ./invidious --migrate
popd popd

View file

@ -22,11 +22,6 @@ then
yunohost service remove "$app" yunohost service remove "$app"
fi fi
#=================================================
# REMOVE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=10
dpkg --remove crystal dpkg --remove crystal
# Remove the dedicated systemd config # Remove the dedicated systemd config

View file

@ -9,15 +9,6 @@
source ../settings/scripts/_common.sh source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR
#================================================= #=================================================
@ -49,6 +40,8 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database="$db_name"
#================================================= #=================================================
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable "$app.service" --quiet systemctl enable "$app.service" --quiet

View file

@ -9,12 +9,6 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# STANDARD UPGRADE STEPS # STANDARD UPGRADE STEPS
#================================================= #=================================================
@ -69,26 +63,13 @@ ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- -
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..." --weight=1
if [ "$upgrade_type" == "UPGRADE_APP" ] # Download, check integrity, uncompress and patch the source from manifest.toml
then ynh_setup_source --dest_dir="$install_dir"
ynh_script_progression --message="Upgrading source files..." --weight=5 ynh_exec_warn_less shards install --production
ynh_exec_warn_less crystal build "$install_dir/src/invidious.cr" --release
pushd "$install_dir"
chown -R "$app:www-data" "$install_dir"
git config --system --add safe.directory "$install_dir"
ynh_exec_as "$app" git config pull.rebase false
ynh_exec_as "$app" git fetch
#git checkout master
ynh_exec_as "$app" git reset --hard --quiet "$version_commit"
ynh_exec_as "$app" git pull
ynh_exec_warn_less shards install --production
ynh_exec_warn_less crystal build "$install_dir/src/invidious.cr" --release
popd
fi
chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir" chown -R "$app:www-data" "$install_dir"
#================================================= #=================================================