mirror of
https://github.com/YunoHost-Apps/gogs_ynh.git
synced 2024-09-03 20:36:23 +02:00
commit
e5370d9909
12 changed files with 40 additions and 27 deletions
3
.github/workflows/updater.sh
vendored
3
.github/workflows/updater.sh
vendored
|
@ -69,6 +69,9 @@ case $asset_url in
|
||||||
*"gogs_"*"_linux_amd64.tar.gz")
|
*"gogs_"*"_linux_amd64.tar.gz")
|
||||||
src="amd64"
|
src="amd64"
|
||||||
;;
|
;;
|
||||||
|
*"gogs_"*"_linux_armv8.tar.gz")
|
||||||
|
src="arm64"
|
||||||
|
;;
|
||||||
*"gogs_"*"_linux_armv7.tar.gz")
|
*"gogs_"*"_linux_armv7.tar.gz")
|
||||||
src="armhf"
|
src="armhf"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -31,7 +31,7 @@ Gogs (Go Git Service) is a git-based multiplatform forge written in Go. Its part
|
||||||
- Customize HTML templates, static files and many others.
|
- Customize HTML templates, static files and many others.
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 0.12.6~ynh1
|
**Shipped version:** 0.12.7~ynh1
|
||||||
|
|
||||||
**Demo:** https://try.gogs.io/user/login
|
**Demo:** https://try.gogs.io/user/login
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
Gogs (Go Git Service) est une forge multiplateforme basée sur git écrite en Go. Sa particularité est d’être léger et pouvant fonctionner sur carte ARM, ce qui fait qu’il est adapté à l’auto-hébergement. Gogs a une interface web similaire à celle de GitHub.
|
Gogs (Go Git Service) est une forge multiplateforme basée sur git écrite en Go. Sa particularité est d’être léger et pouvant fonctionner sur carte ARM, ce qui fait qu’il est adapté à l’auto-hébergement. Gogs a une interface web similaire à celle de GitHub.
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 0.12.6~ynh1
|
**Version incluse :** 0.12.7~ynh1
|
||||||
|
|
||||||
**Démo :** https://try.gogs.io/user/login
|
**Démo :** https://try.gogs.io/user/login
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/gogs/gogs/releases/download/v0.12.6/gogs_0.12.6_linux_amd64.tar.gz
|
SOURCE_URL=https://github.com/gogs/gogs/releases/download/v0.12.7/gogs_0.12.7_linux_amd64.tar.gz
|
||||||
SOURCE_SUM=591f16331776d02575a11ff135739e44a46e1811b7a7a5c9871bad7bcc47c664
|
SOURCE_SUM=2a0c5d919caa3cb142445950cdd1d39553cc862ede5cd8fefdf9f1cdc1ebf766
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
5
conf/arm64.src
Normal file
5
conf/arm64.src
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
SOURCE_URL=https://github.com/gogs/gogs/releases/download/v0.12.7/gogs_0.12.7_linux_armv8.tar.gz
|
||||||
|
SOURCE_SUM=ac77c69a34b018d437f711b8ea8f28dacd12b98ace6a92aaf25969ff2313cbd8
|
||||||
|
SOURCE_SUM_PRG=sha256sum
|
||||||
|
SOURCE_FORMAT=tar.gz
|
||||||
|
SOURCE_IN_SUBDIR=true
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/gogs/gogs/releases/download/v0.12.6/gogs_0.12.6_linux_armv7.tar.gz
|
SOURCE_URL=https://github.com/gogs/gogs/releases/download/v0.12.7/gogs_0.12.7_linux_armv7.tar.gz
|
||||||
SOURCE_SUM=ee58e5ad8db23406474bded1606c61b822aaedb2a1350aed7403d8958bf3a8f1
|
SOURCE_SUM=f763b2f6a3ea3385432ebefa7378f1bc7767522b8397a2f555fdf749c5f6e7d6
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/gogs/gogs/releases/download/v0.12.6/gogs_0.12.6_linux_386.tar.gz
|
SOURCE_URL=https://github.com/gogs/gogs/releases/download/v0.12.7/gogs_0.12.7_linux_386.tar.gz
|
||||||
SOURCE_SUM=f29320024ad1542022b208909e7a00381355fed9696664a080d296f1faea3eed
|
SOURCE_SUM=d7cfc8685f685739b65519eb44b81640d1f11fba3fb78b55a63c131ec094fe75
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
|
|
||||||
proxy_pass http://localhost:__PORT__/;
|
proxy_pass http://localhost:__PORT__/;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Lightweight self-hosted Git forge",
|
"en": "Lightweight self-hosted Git forge",
|
||||||
"fr": "Forge Git légère auto-hébergé"
|
"fr": "Forge Git légère auto-hébergé"
|
||||||
},
|
},
|
||||||
"version": "0.12.6~ynh1",
|
"version": "0.12.7~ynh1",
|
||||||
"url": "http://gogs.io",
|
"url": "http://gogs.io",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -92,6 +92,14 @@ chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# NGINX CONFIGURATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||||
|
|
||||||
|
# Create a dedicated NGINX config
|
||||||
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DATA DIRECTORY
|
# CREATE DATA DIRECTORY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -113,8 +121,9 @@ chmod -R o-rwx "$datadir"
|
||||||
chown -R $app:www-data "$datadir"
|
chown -R $app:www-data "$datadir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY A CONFIG FILE
|
# ADD A CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||||
|
|
||||||
if [ "$path_url" = "/" ]
|
if [ "$path_url" = "/" ]
|
||||||
then
|
then
|
||||||
|
@ -130,17 +139,14 @@ chown $app:$app "$final_path/custom/conf/app.ini"
|
||||||
|
|
||||||
ynh_add_config --template="../conf/ldap.conf" --destination="$final_path/custom/conf/auth.d/ldap.conf"
|
ynh_add_config --template="../conf/ldap.conf" --destination="$final_path/custom/conf/auth.d/ldap.conf"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SETUP SYSTEMD
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
||||||
|
|
||||||
# Configure init script
|
# Configure init script
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# NGINX CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
|
||||||
ynh_add_nginx_config
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -71,8 +71,6 @@ then
|
||||||
ynh_secure_remove --file="$datadir"
|
ynh_secure_remove --file="$datadir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ynh_secure_remove --file="/var/log/$app"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE LOGROTATE CONFIGURATION
|
# REMOVE LOGROTATE CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -89,6 +87,13 @@ ynh_script_progression --message="Removing NGINX web server configuration..." --
|
||||||
# Remove the dedicated NGINX config
|
# Remove the dedicated NGINX config
|
||||||
ynh_remove_nginx_config
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REMOVE VARIOUS FILES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing various files..." --weight=1
|
||||||
|
|
||||||
|
ynh_secure_remove --file="/var/log/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE DEDICATED USER
|
# REMOVE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -69,13 +69,6 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=2
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STANDARD UPGRADE STEPS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Clean template to fix issue : https://github.com/gogits/gogs/issues/4585
|
|
||||||
ynh_secure_remove --file="$final_path/templates"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue