diff --git a/README.md b/README.md index 1e22aa8..0a8ab12 100644 --- a/README.md +++ b/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 website](http://gogs.io) @@ -77,27 +77,23 @@ Architecture: this package is compatible with amd64, i386 and arm. The package w ## 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. -## Issue -Any issue is welcome here : https://github.com/YunoHost-Apps/gogs_ynh/issues +## Links -## License -Gogs is published under the MIT License: -https://github.com/gogits/gogs/blob/master/LICENSE + * Report a bug: https://github.com/YunoHost-Apps/gogs_ynh/issues + * App website: http://gogs.io + * 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 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 +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/gogs_ynh/tree/testing). +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 ``` diff --git a/conf/arm.src b/conf/arm.src index 7c882e3..f75a170 100644 --- a/conf/arm.src +++ b/conf/arm.src @@ -1,11 +1,5 @@ -SOURCE_URL=https://github.com/gogits/gogs/releases/download/v0.11.79/raspi2_armv6.zip -SOURCE_SUM=a7d17f6dc542fd2d88f884271bca9c62729fbd725fdb310616b2987dba382631 -# (Optional) Program to check the integrity (sha256sum, md5sum...) -# default: sha256 +SOURCE_URL=https://github.com/gogs/gogs/releases/download/v0.12.3/gogs_0.12.3_linux_armv7.zip +SOURCE_SUM=9116d4f1baf6a47dc3a47cfce8f435ad77f7939f2e80323f31382913e895ab35 SOURCE_SUM_PRG=sha256sum -# (Optional) Archive format -# default: tar.gz SOURCE_FORMAT=zip -# (Optional) Put false if sources are directly in the archive root -# default: true SOURCE_IN_SUBDIR=true diff --git a/conf/i386.src b/conf/i386.src index abf6148..a30b0a9 100644 --- a/conf/i386.src +++ b/conf/i386.src @@ -1,11 +1,5 @@ -SOURCE_URL=https://github.com/gogits/gogs/releases/download/v0.11.79/linux_386.zip -SOURCE_SUM=ad1a89eb01723a4b289b7b8773fd018f78b0dad801101f27c1af0f2d649edeeb -# (Optional) Program to check the integrity (sha256sum, md5sum...) -# default: sha256 +SOURCE_URL=https://github.com/gogs/gogs/releases/download/v0.12.3/gogs_0.12.3_linux_386.zip +SOURCE_SUM=bcf7a31ad61865217eca93f4d90ede15837c857accb2394782ebf4a7805e1cbc SOURCE_SUM_PRG=sha256sum -# (Optional) Archive format -# default: tar.gz SOURCE_FORMAT=zip -# (Optional) Put false if sources are directly in the archive root -# default: true SOURCE_IN_SUBDIR=true diff --git a/conf/x86-64.src b/conf/x86-64.src index cd8f52b..1e54b76 100644 --- a/conf/x86-64.src +++ b/conf/x86-64.src @@ -1,11 +1,5 @@ -SOURCE_URL=https://github.com/gogits/gogs/releases/download/v0.11.79/linux_amd64.zip -SOURCE_SUM=85f60494de63e6c4af16faba9bc739eb7c9e5477de1f16d11c6665495141162f -# (Optional) Program to check the integrity (sha256sum, md5sum...) -# default: sha256 +SOURCE_URL=https://github.com/gogs/gogs/releases/download/v0.12.3/gogs_0.12.3_linux_amd64.zip +SOURCE_SUM=0eeab278aaf8fc999329e611fe0709e95e08c26d15bdf60d499268f144e40406 SOURCE_SUM_PRG=sha256sum -# (Optional) Archive format -# default: tar.gz SOURCE_FORMAT=zip -# (Optional) Put false if sources are directly in the archive root -# default: true SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index f25402e..9a365df 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,4 @@ { - "package_format": 1, "name": "Gogs", "id": "gogs", "packaging_format": 1, @@ -9,7 +8,7 @@ }, "url": "http://gogs.io", "license": "MIT", - "version": "0.11.66~ynh1", + "version": "0.12.3~ynh1", "maintainer": { "name": "Josué Tille", "email": "josue@tille.ch" @@ -24,7 +23,7 @@ "mysql" ], "requirements": { - "yunohost": ">= 2.7.12" + "yunohost": ">= 3.8.1" }, "arguments": { "install" : [ diff --git a/scripts/backup b/scripts/backup index 772fae0..01a0761 100644 --- a/scripts/backup +++ b/scripts/backup @@ -11,7 +11,6 @@ source /usr/share/yunohost/helpers ynh_abort_if_errors # Load common variables and helpers -source ../settings/scripts/experimental_helper.sh source ../settings/scripts/_common.sh # Retrieve app settings diff --git a/scripts/change_url b/scripts/change_url index c85fa31..fb02f6c 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -11,7 +11,6 @@ source /usr/share/yunohost/helpers ynh_abort_if_errors # Import common cmd -source ./experimental_helper.sh source ./_common.sh # RETRIEVE ARGUMENTS diff --git a/scripts/experimental_helper.sh b/scripts/experimental_helper.sh deleted file mode 100644 index 600a653..0000000 --- a/scripts/experimental_helper.sh +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/scripts/install b/scripts/install index 76586ee..b97b0a9 100644 --- a/scripts/install +++ b/scripts/install @@ -11,7 +11,6 @@ source /usr/share/yunohost/helpers ynh_abort_if_errors # Load common variables and helpers -source ./experimental_helper.sh source ./_common.sh # Retrieve arguments diff --git a/scripts/remove b/scripts/remove index 681dd01..e5deb31 100644 --- a/scripts/remove +++ b/scripts/remove @@ -8,7 +8,6 @@ source /usr/share/yunohost/helpers # Load common variables and helpers -source ./experimental_helper.sh source ./_common.sh #================================================= diff --git a/scripts/restore b/scripts/restore index 27b6ee5..f135ead 100644 --- a/scripts/restore +++ b/scripts/restore @@ -11,7 +11,6 @@ source /usr/share/yunohost/helpers ynh_abort_if_errors # Load common variables and helpers -source ../settings/scripts/experimental_helper.sh source ../settings/scripts/_common.sh # Retrieve old app settings diff --git a/scripts/upgrade b/scripts/upgrade index 82d0b6d..483f6b4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,7 +11,6 @@ source /usr/share/yunohost/helpers ynh_abort_if_errors # Load common variables and helpers -source ./experimental_helper.sh source ./_common.sh # Retrieve app settings