1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grav_ynh.git synced 2024-09-03 19:16:01 +02:00

Merge pull request #69 from YunoHost-Apps/testing

Update to v1.7.15, small improvements
This commit is contained in:
tituspijean 2021-06-08 11:18:35 +02:00 committed by GitHub
commit feeb8532df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 245 additions and 76 deletions

View file

@ -6,11 +6,11 @@ about: When creating a bug report, please use the following template to provide
**How to post a meaningful bug report** **How to post a meaningful bug report**
1. *Read this whole template first.* 1. *Read this whole template first.*
2. *Make sure you are on the right place:* 2. *Determine if you are on the right place:*
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!* - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
- *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.*
- *In doubt, ask here and we will figure it out together.* - *When in doubt, post here and we will figure it out together.*
3. *Delete these italic comments as you write over them below, and remove this guide.* 3. *Delete the italic comments as you write over them below, and remove this guide.*
--- ---
### Describe the bug ### Describe the bug
@ -22,7 +22,7 @@ about: When creating a bug report, please use the following template to provide
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* - Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
- YunoHost version: x.x.x - YunoHost version: x.x.x
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* - I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes* - Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes*
- If yes, please explain: - If yes, please explain:
- Using, or trying to install package version/branch: - Using, or trying to install package version/branch:
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* - If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
@ -31,13 +31,13 @@ about: When creating a bug report, please use the following template to provide
- *If you performed a command from the CLI, the command itself is enough. For example:* - *If you performed a command from the CLI, the command itself is enough. For example:*
```sh ```sh
sudo yunohost app install grav sudo yunohost app install the_app
``` ```
- *If you used the webadmin, please perform the equivalent command from the CLI first.* - *If you used the webadmin, please perform the equivalent command from the CLI first.*
- *If the error occurs in your browser, explain what you did:* - *If the error occurs in your browser, explain what you did:*
1. *Go to '...'* 1. *Go to '...'*
2. *Click on '....'* 2. *Click on '...'*
3. *Scroll down to '....'* 3. *Scroll down to '...'*
4. *See error* 4. *See error*
### Expected behavior ### Expected behavior

16
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,16 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished and ready to be reviewed/tested
- [ ] The fix/enhancement were manually tested (if applicable)
## Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)

View file

@ -1,69 +1,60 @@
---
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# Grav for YunoHost # Grav for YunoHost
[![Integration level](https://dash.yunohost.org/integration/grav.svg)](https://dash.yunohost.org/appci/app/grav) ![](https://ci-apps.yunohost.org/ci/badges/grav.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/grav.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/grav.svg)](https://dash.yunohost.org/appci/app/grav) ![](https://ci-apps.yunohost.org/ci/badges/grav.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/grav.maintain.svg)
[![Install Grav with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=grav) [![Install grav with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=grav)
> *This package allows you to install Grav quickly and simply on a YunoHost server. *[Lire ce readme en français.](./README_fr.md)*
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
> *This package allows you to install grav quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Overview ## Overview
Grav is a modern open source flat-file CMS.
Provided version: **1.7.10** A modern open source flat-file CMS
**Shipped version:** 1.7.15
**Demo:** https://getgrav.org/downloads/themes
## Screenshots ## Screenshots
![](https://framalibre.org/sites/default/files/Screenshot_2019-05-30_at_02.09_.36_.png)
## Documentation ![](./doc/screenshots/grav.jpg)
* Official documentation: https://learn.getgrav.org/17/
* YunoHost documentation: If specific documentation is needed, feel free to contribute.
## Limitations
* If installing Grav at the root of a domain, bear in mind that paths starting by `/yunohost` are reserved.
## Installation ## Disclaimers / important information
Use either YunoHost's admin panel or command line: * You can access the administration panel at `yourdomain.tld/path/admin`. Users created within YunoHost can log in, provided their were given the appropriate permissions:
* To make users administrators, give them the `grav.admin` permission.
```sh * To allow users to log in, without extended rights, give them the `grav.user` permission.
sudo yunohost app install https://github.com/YunoHost-Apps/grav_ynh
```
For upgrading (replace `grav` by the actual instance ID if more instances are installed):
```sh
sudo yunohost app upgrade grav -u https://github.com/YunoHost-Apps/grav_ynh
```
## Administration and plugin installation
* You can access the administration panel at `yourdomain.tld/path/admin`. Users created within YunoHost can log in, provided their were given the appropriate permissions (see next section).
* Grav provides a command line interface. Refer to its documentation, but you will need to specifically call for the PHP version currently used for the app: * Grav provides a command line interface. Refer to its documentation, but you will need to specifically call for the PHP version currently used for the app:
* Go to your app's directory: `cd /var/www/grav` (or `grav__2`, etc. if you have multiple ones) * Go to your app's directory: `cd /var/www/grav` (or `grav__2`, etc. if you have multiple ones)
* `php7.3 bin/grav ...` or `php7.3 bin/gpm ...` * `php7.3 bin/grav ...` or `php7.3 bin/gpm ...`
* You can install plugins through the admin panel, or through the GPM. * You can install plugins through the admin panel, or through the GPM.
* If installing Grav at the root of a domain, bear in mind that paths starting by `/yunohost` are reserved.
## Permissions
To make users administrators, give them the `grav.admin` permission.
To allow users to log in, give them the `grav.user` permission.
#### Supported architectures ## Documentation and resources
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/grav%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/grav/) * Official app website: https://www.getgrav.org/
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/grav%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/grav/)
## Links * Official admin documentation: https://learn.getgrav.org
* Upstream app code repository: https://github.com/getgrav/grav
* Report a bug about this package: https://github.com/YunoHost-Apps/grav_ynh/issues * YunoHost documentation for this app: https://yunohost.org/app_grav
* Documentation: https://learn.getgrav.org/ * Report a bug: https://github.com/YunoHost-Apps/grav_ynh/issues
* Grav website: https://www.getgrav.org/
* Upstream app repository: https://github.com/getgrav/grav
* YunoHost website: https://yunohost.org/
---
## Developer info ## Developer info
@ -75,3 +66,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/grav_ynh/tree/testing
or or
sudo yunohost app upgrade grav -u https://github.com/YunoHost-Apps/grav_ynh/tree/testing --debug sudo yunohost app upgrade grav -u https://github.com/YunoHost-Apps/grav_ynh/tree/testing --debug
``` ```
**More info regarding app packaging:** https://yunohost.org/packaging_apps

62
README_fr.md Normal file
View file

@ -0,0 +1,62 @@
# Grav pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/grav.svg)](https://dash.yunohost.org/appci/app/grav) ![](https://ci-apps.yunohost.org/ci/badges/grav.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/grav.maintain.svg)
[![Installer grav avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=grav)
*[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *This package allows you to install grav quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Vue d'ensemble
Un CMS moderne basé sur des fichiers plats
**Version incluse:** 1.7.15~ynh1
**Démo:** https://getgrav.org/downloads/themes
## Captures d'écran
![](./doc/screenshots/grav.jpg)
## Avertissements / informations importantes
* Vous pouvez accéder au panneau d'adminstration à l'adresse `votredomaine.tld/votrechemin/admin`. Les utilisateurs créés dans YunoHost peuvent se connecter, à condition de leur avoir octroyé la permission adéquate:
* `grav.admin` pour qu'ils soient administrateur de Grav ;
* `grav.user` pour qu'ils puissent se connecter, mais sans droit étendu.
* Grav dispose d'une interface par ligne de commande. Référez-vous à sa documentation, mais sachez que vous devrez préciser la version de PHP utilisée par l'app:
* Allez dans le répertoire de Grav: `cd /var/www/grav` (ou `grav__2`, etc. si vous avez de multiples instances)
* `php7.3 bin/grav ...` ou `php7.3 bin/gpm ...`
* Vous pouvez installer les extensions soit via le panneau d'administration, soit via GPM.
* Si vous installez Grav à la racin d'un domaine, sachez que les chemins d'accès commançant par `/yunohost` sont réservés.
## Documentations et ressources
* Site official de l'app : https://www.getgrav.org/
* Documentation officielle de l'admin: https://learn.getgrav.org
* Dépôt de code officiel de l'app: https://github.com/getgrav/grav
* Documentation YunoHost pour cette app: https://yunohost.org/app_grav
* Signaler un bug: https://github.com/YunoHost-Apps/grav_ynh/issues
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/grav_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.
```
sudo yunohost app install https://github.com/YunoHost-Apps/grav_ynh/tree/testing --debug
or
sudo yunohost app upgrade grav -u https://github.com/YunoHost-Apps/grav_ynh/tree/testing --debug
```
**Plus d'infos sur le packaging d'applications:** https://yunohost.org/packaging_apps

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.7.10/grav-admin-v1.7.10.zip SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.7.15/grav-admin-v1.7.15.zip
SOURCE_SUM=0FF6ADD05384DDA0ED07551674A70E3F3FF9117AE6B2D16E1BCE0CACD348C4D8 SOURCE_SUM=3acd9067720876ffc4c5b0f7c0ac2d495c3b3211d6c2c88cabd20dc18988115a
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

0
doc/.gitkeep Normal file
View file

8
doc/DISCLAIMER.md Normal file
View file

@ -0,0 +1,8 @@
* You can access the administration panel at `yourdomain.tld/path/admin`. Users created within YunoHost can log in, provided their were given the appropriate permissions:
* To make users administrators, give them the `grav.admin` permission.
* To allow users to log in, without extended rights, give them the `grav.user` permission.
* Grav provides a command line interface. Refer to its documentation, but you will need to specifically call for the PHP version currently used for the app:
* Go to your app's directory: `cd /var/www/grav` (or `grav__2`, etc. if you have multiple ones)
* `php7.3 bin/grav ...` or `php7.3 bin/gpm ...`
* You can install plugins through the admin panel, or through the GPM.
* If installing Grav at the root of a domain, bear in mind that paths starting by `/yunohost` are reserved.

8
doc/DISCLAIMER_fr.md Normal file
View file

@ -0,0 +1,8 @@
* Vous pouvez accéder au panneau d'adminstration à l'adresse `votredomaine.tld/votrechemin/admin`. Les utilisateurs créés dans YunoHost peuvent se connecter, à condition de leur avoir octroyé la permission adéquate:
* `grav.admin` pour qu'ils soient administrateur de Grav ;
* `grav.user` pour qu'ils puissent se connecter, mais sans droit étendu.
* Grav dispose d'une interface par ligne de commande. Référez-vous à sa documentation, mais sachez que vous devrez préciser la version de PHP utilisée par l'app:
* Allez dans le répertoire de Grav: `cd /var/www/grav` (ou `grav__2`, etc. si vous avez de multiples instances)
* `php7.3 bin/grav ...` ou `php7.3 bin/gpm ...`
* Vous pouvez installer les extensions soit via le panneau d'administration, soit via GPM.
* Si vous installez Grav à la racin d'un domaine, sachez que les chemins d'accès commançant par `/yunohost` sont réservés.

0
doc/screenshots/.gitkeep Normal file
View file

BIN
doc/screenshots/grav.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

View file

@ -6,14 +6,17 @@
"en": "A modern open source flat-file CMS", "en": "A modern open source flat-file CMS",
"fr": "Un CMS moderne basé sur des fichiers plats" "fr": "Un CMS moderne basé sur des fichiers plats"
}, },
"version": "1.7.10~ynh1", "version": "1.7.15~ynh1",
"url": "https://www.getgrav.org/", "url": "https://www.getgrav.org/",
"upstream": {
"license": "MIT",
"website": "https://www.getgrav.org/",
"demo": "https://getgrav.org/downloads/themes",
"admindoc": "https://learn.getgrav.org",
"code": "https://github.com/getgrav/grav"
},
"license": "MIT-0", "license": "MIT-0",
"maintainer": [ "maintainer": [
{
"name": "jibec",
"email": "jean-baptiste@holcroft.fr"
},
{ {
"name": "tituspijean", "name": "tituspijean",
"email": "tituspijean@outlook.com" "email": "tituspijean@outlook.com"
@ -25,6 +28,10 @@
},{ },{
"name": "lithrel", "name": "lithrel",
"email": "lithrel@randomdomainname.net" "email": "lithrel@randomdomainname.net"
},
{
"name": "jibec",
"email": "jean-baptiste@holcroft.fr"
}], }],
"requirements": { "requirements": {
"yunohost": ">= 4.1.0" "yunohost": ">= 4.1.0"

View file

@ -1,18 +0,0 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished.
- [ ] Tested with Package_check.
- [ ] Fix or enhancement tested.
- [ ] Upgrade from last version tested.
- [ ] Can be reviewed and tested.
## Package_check results
---
*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results*
[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/grav_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/grav_ynh%20PR-NUM-%20(USERNAME)/)

93
scripts/update_version.sh Executable file
View file

@ -0,0 +1,93 @@
#!/bin/bash
source /usr/share/yunohost/helpers
repo="getgrav/grav"
#=================================================
# META HELPER FOR PACKAGE RELEASES
#=================================================
# This script is meant to be manually run by the app packagers
# to automatically update the source files.
# Thanks @lukechild and @jbellocastro
# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c
version=$(curl --silent "https://api.github.com/repos/$repo/releases/latest" | jq -r ".tag_name")
app_url=$(curl --silent "https://api.github.com/repos/$repo/releases/latest" | jq -r ".assets[0].browser_download_url")
app_upgrade_url=$(curl --silent "https://api.github.com/repos/$repo/releases/latest" | jq -r ".assets[0].browser_download_url")
###
# APP.SRC
###
# Create the temporary directory
tempdir="$(mktemp -d)"
# Download sources and calculate checksum
filename=${app_url##*/}
curl --silent -4 -L $app_url -o "$tempdir/$filename"
checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
ynh_secure_remove $tempdir
# Get extension
if [[ $filename == *.tar.gz ]]; then
extension=tar.gz
else
extension=${filename##*.}
fi
cat <<EOT > ../conf/app.src
SOURCE_URL=$app_url
SOURCE_SUM=$checksum
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=$extension
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=
EOT
###
# APP.UPDATE.SRC
###
# Create the temporary directory
tempdir="$(mktemp -d)"
# Download sources and calculate checksum
filename=${app_upgrade_url##*/}
curl --silent -4 -L $app_upgrade_url -o "$tempdir/$filename"
checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
ynh_secure_remove $tempdir
# Get extension
if [[ $filename == *.tar.gz ]]; then
extension=tar.gz
else
extension=${filename##*.}
fi
cat <<EOT > ../conf/app.src
SOURCE_URL=$app_upgrade_url
SOURCE_SUM=$checksum
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=$extension
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=
EOT
###
# README and COMMIT
###
sed -i "s#\*\*Shipped version:\*\*.*#\*\*Shipped version:\*\* ${version}#" ../README.md
sed -i "s#\*\*Version incluse :\*\*.*#\*\*Version incluse :\*\* ${version}#" ../README_fr.md
sed -i "s# \"version\": \".*# \"version\": \"${version}\~ynh1\",#" ../manifest.json
# TODO: Run README maker
message="Upgrade to v$version"
if [ "$message" == "$(git show -s --format=%s)" ]; then
git commit ../README.md ../README_fr.md ../manifest.json ../conf/app.src --amend -m "$message"
else
git commit ../README.md ../README_fr.md ../manifest.json ../conf/app.src -m "$message"
fi