mirror of
https://github.com/YunoHost-Apps/gogs_ynh.git
synced 2024-09-03 20:36:23 +02:00
v.0.12.3
This commit is contained in:
parent
ea10ea8d18
commit
76ce0e961e
12 changed files with 22 additions and 112 deletions
32
README.md
32
README.md
|
@ -1,4 +1,4 @@
|
||||||
# Gogs package for YunoHost
|
# Gogs for YunoHost
|
||||||
|
|
||||||
Gogs is a self-hosted Git service written in Go. Alternative to Github.
|
Gogs is a self-hosted Git service written in Go. Alternative to Github.
|
||||||
- [Gogs website](http://gogs.io)
|
- [Gogs website](http://gogs.io)
|
||||||
|
@ -77,27 +77,23 @@ Architecture: this package is compatible with amd64, i386 and arm. The package w
|
||||||
## Private Mode
|
## Private Mode
|
||||||
Actually it's possible to access to the git repositories by the `git` command over http also in private mode installation. It's important to know that in this mode the repository could be ALSO getted if you don't set the repository as private in the repos settings.
|
Actually it's possible to access to the git repositories by the `git` command over http also in private mode installation. It's important to know that in this mode the repository could be ALSO getted if you don't set the repository as private in the repos settings.
|
||||||
|
|
||||||
## Issue
|
|
||||||
|
|
||||||
Any issue is welcome here : https://github.com/YunoHost-Apps/gogs_ynh/issues
|
## Links
|
||||||
|
|
||||||
## License
|
* Report a bug: https://github.com/YunoHost-Apps/gogs_ynh/issues
|
||||||
Gogs is published under the MIT License:
|
* App website: http://gogs.io
|
||||||
https://github.com/gogits/gogs/blob/master/LICENSE
|
* Upstream app repository: https://github.com/gogs/gogs
|
||||||
|
* YunoHost website: https://yunohost.org/
|
||||||
|
|
||||||
This package is published under the MIT License.
|
---
|
||||||
|
|
||||||
|
## Developer info
|
||||||
|
|
||||||
## Developper info
|
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/gogs_ynh/tree/testing).
|
||||||
Please do your pull requests to the `dev` branch.
|
|
||||||
|
|
||||||
Test or upgrade to dev version:
|
|
||||||
```bash
|
|
||||||
sudo su - admin
|
|
||||||
git clone -b dev https://github.com/YunoHost-Apps/gogs_ynh
|
|
||||||
# to install
|
|
||||||
sudo yunohost app install -l Gogs /home/admin/gogs_ynh
|
|
||||||
# to upgrade
|
|
||||||
sudo yunohost app upgrade -f /home/admin/gogs_ynh gogs
|
|
||||||
|
|
||||||
|
To try the testing branch, please proceed like that.
|
||||||
|
```
|
||||||
|
sudo yunohost app install https://github.com/YunoHost-Apps/gogs_ynh/tree/testing --debug
|
||||||
|
or
|
||||||
|
sudo yunohost app upgrade gogs -u https://github.com/YunoHost-Apps/gogs_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
10
conf/arm.src
10
conf/arm.src
|
@ -1,11 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/gogits/gogs/releases/download/v0.11.79/raspi2_armv6.zip
|
SOURCE_URL=https://github.com/gogs/gogs/releases/download/v0.12.3/gogs_0.12.3_linux_armv7.zip
|
||||||
SOURCE_SUM=a7d17f6dc542fd2d88f884271bca9c62729fbd725fdb310616b2987dba382631
|
SOURCE_SUM=9116d4f1baf6a47dc3a47cfce8f435ad77f7939f2e80323f31382913e895ab35
|
||||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
|
||||||
# default: sha256
|
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
# (Optional) Archive format
|
|
||||||
# default: tar.gz
|
|
||||||
SOURCE_FORMAT=zip
|
SOURCE_FORMAT=zip
|
||||||
# (Optional) Put false if sources are directly in the archive root
|
|
||||||
# default: true
|
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/gogits/gogs/releases/download/v0.11.79/linux_386.zip
|
SOURCE_URL=https://github.com/gogs/gogs/releases/download/v0.12.3/gogs_0.12.3_linux_386.zip
|
||||||
SOURCE_SUM=ad1a89eb01723a4b289b7b8773fd018f78b0dad801101f27c1af0f2d649edeeb
|
SOURCE_SUM=bcf7a31ad61865217eca93f4d90ede15837c857accb2394782ebf4a7805e1cbc
|
||||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
|
||||||
# default: sha256
|
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
# (Optional) Archive format
|
|
||||||
# default: tar.gz
|
|
||||||
SOURCE_FORMAT=zip
|
SOURCE_FORMAT=zip
|
||||||
# (Optional) Put false if sources are directly in the archive root
|
|
||||||
# default: true
|
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/gogits/gogs/releases/download/v0.11.79/linux_amd64.zip
|
SOURCE_URL=https://github.com/gogs/gogs/releases/download/v0.12.3/gogs_0.12.3_linux_amd64.zip
|
||||||
SOURCE_SUM=85f60494de63e6c4af16faba9bc739eb7c9e5477de1f16d11c6665495141162f
|
SOURCE_SUM=0eeab278aaf8fc999329e611fe0709e95e08c26d15bdf60d499268f144e40406
|
||||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
|
||||||
# default: sha256
|
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
# (Optional) Archive format
|
|
||||||
# default: tar.gz
|
|
||||||
SOURCE_FORMAT=zip
|
SOURCE_FORMAT=zip
|
||||||
# (Optional) Put false if sources are directly in the archive root
|
|
||||||
# default: true
|
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"package_format": 1,
|
|
||||||
"name": "Gogs",
|
"name": "Gogs",
|
||||||
"id": "gogs",
|
"id": "gogs",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
},
|
},
|
||||||
"url": "http://gogs.io",
|
"url": "http://gogs.io",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "0.11.66~ynh1",
|
"version": "0.12.3~ynh1",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "Josué Tille",
|
"name": "Josué Tille",
|
||||||
"email": "josue@tille.ch"
|
"email": "josue@tille.ch"
|
||||||
|
@ -24,7 +23,7 @@
|
||||||
"mysql"
|
"mysql"
|
||||||
],
|
],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 2.7.12"
|
"yunohost": ">= 3.8.1"
|
||||||
},
|
},
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install" : [
|
"install" : [
|
||||||
|
|
|
@ -11,7 +11,6 @@ source /usr/share/yunohost/helpers
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
# Load common variables and helpers
|
# Load common variables and helpers
|
||||||
source ../settings/scripts/experimental_helper.sh
|
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
|
|
||||||
# Retrieve app settings
|
# Retrieve app settings
|
||||||
|
|
|
@ -11,7 +11,6 @@ source /usr/share/yunohost/helpers
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
# Import common cmd
|
# Import common cmd
|
||||||
source ./experimental_helper.sh
|
|
||||||
source ./_common.sh
|
source ./_common.sh
|
||||||
|
|
||||||
# RETRIEVE ARGUMENTS
|
# RETRIEVE ARGUMENTS
|
||||||
|
|
|
@ -1,61 +0,0 @@
|
||||||
# Delete a file checksum from the app settings
|
|
||||||
#
|
|
||||||
# $app should be defined when calling this helper
|
|
||||||
#
|
|
||||||
# usage: ynh_remove_file_checksum file
|
|
||||||
# | arg: file - The file for which the checksum will be deleted
|
|
||||||
ynh_delete_file_checksum () {
|
|
||||||
local checksum_setting_name=checksum_${1//[\/ ]/_} # Replace all '/' and ' ' by '_'
|
|
||||||
ynh_app_setting_delete $app $checksum_setting_name
|
|
||||||
}
|
|
||||||
|
|
||||||
# Start or restart a service and follow its booting
|
|
||||||
#
|
|
||||||
# usage: ynh_check_starting "Line to match" [Log file] [Timeout] [Service name]
|
|
||||||
#
|
|
||||||
# | arg: Line to match - The line to find in the log to attest the service have finished to boot.
|
|
||||||
# | arg: Log file - The log file to watch
|
|
||||||
# | arg: Service name
|
|
||||||
# /var/log/$app/$app.log will be used if no other log is defined.
|
|
||||||
# | arg: Timeout - The maximum time to wait before ending the watching. Defaut 300 seconds.
|
|
||||||
ynh_check_starting () {
|
|
||||||
local line_to_match="$1"
|
|
||||||
local service_name="${4:-$app}"
|
|
||||||
local app_log="${2:-/var/log/$service_name/$service_name.log}"
|
|
||||||
local timeout=${3:-300}
|
|
||||||
|
|
||||||
ynh_clean_check_starting () {
|
|
||||||
# Stop the execution of tail.
|
|
||||||
kill -s 15 $pid_tail 2>&1
|
|
||||||
ynh_secure_remove "$templog" 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "Starting of $service_name" >&2
|
|
||||||
systemctl stop $service_name
|
|
||||||
local templog="$(mktemp)"
|
|
||||||
# Following the starting of the app in its log
|
|
||||||
tail -F -n0 "$app_log" > "$templog" &
|
|
||||||
# Get the PID of the tail command
|
|
||||||
local pid_tail=$!
|
|
||||||
systemctl start $service_name
|
|
||||||
|
|
||||||
local i=0
|
|
||||||
for i in `seq 1 $timeout`
|
|
||||||
do
|
|
||||||
# Read the log until the sentence is found, that means the app finished to start. Or run until the timeout
|
|
||||||
if grep --quiet "$line_to_match" "$templog"
|
|
||||||
then
|
|
||||||
echo "The service $service_name has correctly started." >&2
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
echo -n "." >&2
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
if [ $i -eq $timeout ]
|
|
||||||
then
|
|
||||||
echo "The service $service_name didn't fully started before the timeout." >&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
ynh_clean_check_starting
|
|
||||||
}
|
|
|
@ -11,7 +11,6 @@ source /usr/share/yunohost/helpers
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
# Load common variables and helpers
|
# Load common variables and helpers
|
||||||
source ./experimental_helper.sh
|
|
||||||
source ./_common.sh
|
source ./_common.sh
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Load common variables and helpers
|
# Load common variables and helpers
|
||||||
source ./experimental_helper.sh
|
|
||||||
source ./_common.sh
|
source ./_common.sh
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -11,7 +11,6 @@ source /usr/share/yunohost/helpers
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
# Load common variables and helpers
|
# Load common variables and helpers
|
||||||
source ../settings/scripts/experimental_helper.sh
|
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
|
|
||||||
# Retrieve old app settings
|
# Retrieve old app settings
|
||||||
|
|
|
@ -11,7 +11,6 @@ source /usr/share/yunohost/helpers
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
# Load common variables and helpers
|
# Load common variables and helpers
|
||||||
source ./experimental_helper.sh
|
|
||||||
source ./_common.sh
|
source ./_common.sh
|
||||||
|
|
||||||
# Retrieve app settings
|
# Retrieve app settings
|
||||||
|
|
Loading…
Reference in a new issue