1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lstu_ynh.git synced 2024-09-03 19:36:12 +02:00

Merge pull request #79 from Thovi98/ci-auto-update-0.28-0

Try to fix upgrade + upgrade to 0.28-0
This commit is contained in:
eric_G 2024-06-04 23:05:13 +02:00 committed by GitHub
commit ea14d2dfd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 18 additions and 26 deletions

View file

@ -19,7 +19,7 @@ It shall NOT be edited by hand.
Lstu means Let's Shorten That URL. Lstu means Let's Shorten That URL.
**Shipped version:** 0.26.0~ynh3 **Shipped version:** 0.28-0~ynh1
**Demo:** <https://lstu.fr> **Demo:** <https://lstu.fr>

View file

@ -19,7 +19,7 @@ EZ editatu eskuz.
Lstu means Let's Shorten That URL. Lstu means Let's Shorten That URL.
**Paketatutako bertsioa:** 0.26.0~ynh3 **Paketatutako bertsioa:** 0.28-0~ynh1
**Demoa:** <https://lstu.fr> **Demoa:** <https://lstu.fr>

View file

@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main.
Raccourcisseur d'URL Raccourcisseur d'URL
**Version incluse:** 0.26.0~ynh3 **Version incluse:** 0.28-0~ynh1
**Démo:** <https://lstu.fr> **Démo:** <https://lstu.fr>

View file

@ -19,7 +19,7 @@ NON debe editarse manualmente.
Lstu means Let's Shorten That URL. Lstu means Let's Shorten That URL.
**Versión proporcionada:** 0.26.0~ynh3 **Versión proporcionada:** 0.28-0~ynh1
**Demo:** <https://lstu.fr> **Demo:** <https://lstu.fr>

View file

@ -19,7 +19,7 @@
Lstu means Let's Shorten That URL. Lstu means Let's Shorten That URL.
**分发版本:** 0.26.0~ynh3 **分发版本:** 0.28-0~ynh1
**演示:** <https://lstu.fr> **演示:** <https://lstu.fr>

View file

@ -6,6 +6,7 @@ location __PATH__/ {
proxy_pass http://127.0.0.1:__PORT__; proxy_pass http://127.0.0.1:__PORT__;
proxy_http_version 1.1;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

View file

@ -5,7 +5,7 @@ name = "Lstu"
description.en = "URL Shortener" description.en = "URL Shortener"
description.fr = "Raccourcisseur d'URL" description.fr = "Raccourcisseur d'URL"
version = "0.26.0~ynh3" version = "0.28-0~ynh1"
maintainers = ["frju365"] maintainers = ["frju365"]
@ -49,8 +49,8 @@ ram.runtime = "50M"
[resources] [resources]
[resources.sources.main] [resources.sources.main]
url = "https://framagit.org/fiat-tux/hat-softwares/lstu/-/archive/0.26-0/lstu-0.26-0.tar.gz" url = "https://framagit.org/fiat-tux/hat-softwares/lstu/-/archive/0.28-0/lstu-0.28-0.tar.gz"
sha256 = "323c81b4cb04a97eda7cb37b2a63d16e808591fd46eb4326f6619200ce742960" sha256 = "bb6531dbbc67800b818147fa0758b3581f4a8bf0267537f4ba598334c0c7ab3b"
autoupdate.strategy = "latest_gitlab_release" autoupdate.strategy = "latest_gitlab_release"
[resources.ports] [resources.ports]

View file

@ -58,7 +58,7 @@ yunohost service add $app --log="/var/log/$app.log" --log="/var/www/$app/log/pro
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." ynh_script_progression --message="Adding a configuration file..."
ynh_add_config --template="../conf/lstu.conf.ldap" --destination="$install_dir/lstu.conf" ynh_add_config --template="lstu.conf.ldap" --destination="$install_dir/lstu.conf"
#================================================= #=================================================
# INSTALL LSTU # INSTALL LSTU
@ -66,7 +66,7 @@ ynh_add_config --template="../conf/lstu.conf.ldap" --destination="$install_dir/l
ynh_script_progression --message="Installing Lstu..." ynh_script_progression --message="Installing Lstu..."
pushd $install_dir pushd $install_dir
carton install --deployment --without=sqlite --without=mysql carton install --without=sqlite --without=mysql
popd popd
#================================================= #=================================================

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
#================================================= #=================================================
@ -27,14 +21,10 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..."
if [ "$upgrade_type" == "UPGRADE_APP" ] # Download, check integrity, uncompress and patch the source from app.src
then ynh_setup_source --dest_dir="$install_dir" --keep="lstu.conf"
ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="lstu.conf"
fi
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"
@ -46,15 +36,16 @@ chown -R $app:www-data "$install_dir"
#================================================= #=================================================
#ynh_script_progression --message="Updating a configuration file..." #ynh_script_progression --message="Updating a configuration file..."
#ynh_add_config --template="../conf/lstu.conf.ldap" --destination="$install_dir/lstu.conf" #ynh_add_config --template="lstu.conf.ldap" --destination="$install_dir/lstu.conf"
#================================================= #=================================================
# BUILD LSU # BUILD LSU
#================================================= #=================================================
ynh_script_progression --message="Building lstu..." ynh_script_progression --message="Building $app..."
pushd $install_dir pushd $install_dir
carton install --deployment --without=sqlite --without=mysql ynh_secure_remove --file="$install_dir/local"
carton install --without=sqlite --without=mysql
popd popd
#================================================= #=================================================