diff --git a/issue_template.md b/.github/ISSUE_TEMPLATE.md similarity index 85% rename from issue_template.md rename to .github/ISSUE_TEMPLATE.md index 67f5bf5..2729a6b 100644 --- a/issue_template.md +++ b/.github/ISSUE_TEMPLATE.md @@ -6,11 +6,11 @@ about: When creating a bug report, please use the following template to provide **How to post a meaningful bug report** 1. *Read this whole template first.* -2. *Make sure 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!* +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!* - *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.* -3. *Delete these italic comments as you write over them below, and remove this guide.* + - *When in doubt, post here and we will figure it out together.* +3. *Delete the italic comments as you write over them below, and remove this guide.* --- ### 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 / ...* - YunoHost version: x.x.x - 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: - 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`* @@ -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:* ```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 the error occurs in your browser, explain what you did:* 1. *Go to '...'* - 2. *Click on '....'* - 3. *Scroll down to '....'* + 2. *Click on '...'* + 3. *Scroll down to '...'* 4. *See error* ### Expected behavior diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -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) diff --git a/README.md b/README.md index 7841ced..97a2372 100644 --- a/README.md +++ b/README.md @@ -1,69 +1,60 @@ + + +--- + + + # 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) -[![Install Grav with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=grav) +[![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) -> *This package allows you to install Grav quickly and simply on a YunoHost server. -If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* +*[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.* ## 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 -![](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: - -```sh -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). +* 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 ...` + * `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. -## 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/) -* 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/) +* Official app website: https://www.getgrav.org/ -## Links - - * Report a bug about this package: https://github.com/YunoHost-Apps/grav_ynh/issues - * Documentation: https://learn.getgrav.org/ - * Grav website: https://www.getgrav.org/ - * Upstream app repository: https://github.com/getgrav/grav - * YunoHost website: https://yunohost.org/ - ---- +* Official admin documentation: https://learn.getgrav.org +* Upstream app code repository: https://github.com/getgrav/grav +* YunoHost documentation for this app: https://yunohost.org/app_grav +* Report a bug: https://github.com/YunoHost-Apps/grav_ynh/issues ## Developer info @@ -75,3 +66,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/grav_ynh/tree/testing or 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 \ No newline at end of file diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..e028694 --- /dev/null +++ b/README_fr.md @@ -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 \ No newline at end of file diff --git a/conf/app.src b/conf/app.src index 932f757..25f81c2 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.7.10/grav-admin-v1.7.10.zip -SOURCE_SUM=0FF6ADD05384DDA0ED07551674A70E3F3FF9117AE6B2D16E1BCE0CACD348C4D8 +SOURCE_URL=https://github.com/getgrav/grav/releases/download/1.7.15/grav-admin-v1.7.15.zip +SOURCE_SUM=3acd9067720876ffc4c5b0f7c0ac2d495c3b3211d6c2c88cabd20dc18988115a SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..9b37b3c --- /dev/null +++ b/doc/DISCLAIMER.md @@ -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. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..7468b27 --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -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. diff --git a/doc/screenshots/.gitkeep b/doc/screenshots/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/screenshots/grav.jpg b/doc/screenshots/grav.jpg new file mode 100644 index 0000000..caa2607 Binary files /dev/null and b/doc/screenshots/grav.jpg differ diff --git a/manifest.json b/manifest.json index 109c59c..480ce93 100644 --- a/manifest.json +++ b/manifest.json @@ -6,14 +6,17 @@ "en": "A modern open source flat-file CMS", "fr": "Un CMS moderne basé sur des fichiers plats" }, - "version": "1.7.10~ynh1", + "version": "1.7.15~ynh1", "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", "maintainer": [ - { - "name": "jibec", - "email": "jean-baptiste@holcroft.fr" - }, { "name": "tituspijean", "email": "tituspijean@outlook.com" @@ -25,6 +28,10 @@ },{ "name": "lithrel", "email": "lithrel@randomdomainname.net" + }, + { + "name": "jibec", + "email": "jean-baptiste@holcroft.fr" }], "requirements": { "yunohost": ">= 4.1.0" diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 78ab04d..0000000 --- a/pull_request_template.md +++ /dev/null @@ -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)/) diff --git a/scripts/update_version.sh b/scripts/update_version.sh new file mode 100755 index 0000000..223c013 --- /dev/null +++ b/scripts/update_version.sh @@ -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 < ../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 < ../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