1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/spip_ynh.git synced 2024-09-03 20:25:59 +02:00

Merge pull request #41 from YunoHost-Apps/testing

Testing
This commit is contained in:
Kayou 2022-02-07 14:18:36 +01:00 committed by GitHub
commit ada600bccc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 261 additions and 69 deletions

130
.github/workflows/updater.sh vendored Normal file
View file

@ -0,0 +1,130 @@
#!/bin/bash
#=================================================
# PACKAGE UPDATING HELPER
#=================================================
# This script is meant to be run by GitHub Actions
# The YunoHost-Apps organisation offers a template Action to run this script periodically
# Since each app is different, maintainers can adapt its contents so as to perform
# automatic actions when a new upstream release is detected.
#=================================================
# FETCHING LATEST RELEASE AND ITS ASSETS
#=================================================
# Fetching information
current_version=$(cat manifest.json | jq -j '.version|split("~")[0]')
repo=$(cat manifest.json | jq -j '.upstream.code|split("https://git.spip.net/")[1]')
# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions)
version=$(curl --silent "https://git.spip.net/api/v1/repos/spip/spip/tags" | jq -r '.[] | .name' | sort -V | tail -1)
assets=("https://files.spip.net/spip/archives/spip-$version.zip")
# Later down the script, we assume the version has only digits and dots
# Sometimes the release name starts with a "v", so let's filter it out.
# You may need more tweaks here if the upstream repository has different naming conventions.
if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then
version=${version:1}
fi
# Setting up the environment variables
echo "Current version: $current_version"
echo "Latest release from upstream: $version"
echo "VERSION=$version" >> $GITHUB_ENV
# For the time being, let's assume the script will fail
echo "PROCEED=false" >> $GITHUB_ENV
# Proceed only if the retrieved version is greater than the current one
if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then
echo "::warning ::No new version available"
exit 0
# Proceed only if a PR for this new version does not already exist
elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then
echo "::warning ::A branch already exists for this update"
exit 0
fi
# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.)
echo "${#assets[@]} available asset(s)"
#=================================================
# UPDATE SOURCE FILES
#=================================================
# Here we use the $assets variable to get the resources published in the upstream release.
# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like.
# Let's loop over the array of assets URLs
for asset_url in "${assets[@]}"; do
echo "Handling asset at $asset_url"
# Assign the asset to a source file in conf/ directory
# Here we base the source file name upon a unique keyword in the assets url (admin vs. update)
# Leave $src empty to ignore the asset
case $asset_url in
*"v$version.zip"*)
src="app"
;;
*)
src=""
;;
esac
# If $src is not empty, let's process the asset
if [ ! -z "$src" ]; then
# Create the temporary directory
tempdir="$(mktemp -d)"
# Download sources and calculate checksum
filename=${asset_url##*/}
curl --silent -4 -L $asset_url -o "$tempdir/$filename"
checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
# Delete temporary directory
rm -rf $tempdir
# Get extension
if [[ $filename == *.tar.gz ]]; then
extension=tar.gz
else
extension=${filename##*.}
fi
# Rewrite source file
cat <<EOT > conf/$src.src
SOURCE_URL=$asset_url
SOURCE_SUM=$checksum
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=$extension
SOURCE_IN_SUBDIR=false
SOURCE_EXTRACT=true
EOT
echo "... conf/$src.src updated"
else
echo "... asset ignored"
fi
done
#=================================================
# SPECIFIC UPDATE STEPS
#=================================================
# Any action on the app's source code can be done.
# The GitHub Action workflow takes care of committing all changes after this script ends.
#=================================================
# GENERIC FINALIZATION
#=================================================
# Replace new version in manifest
echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json
# No need to update the README, yunohost-bot takes care of it
# The Action will proceed only if the PROCEED environment variable is set to true
echo "PROCEED=true" >> $GITHUB_ENV
exit 0

View file

@ -1,3 +1,8 @@
<!--
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.
-->
# SPIP for YunoHost
[![Integration level](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/app/spip) ![](https://ci-apps.yunohost.org/ci/badges/spip.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/spip.maintain.svg)
@ -5,45 +10,32 @@
*[Lire ce readme en français.](./README_fr.md)*
> *This package allow you to install SPIP 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.*
> *This package allows you to install SPIP 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
SPIP is a publishing system for the Internet in which great importance is attached to collaborative working, to multilingual environments, and to simplicity of use for web authors. It is free software, distributed under the GNU/GPL licence. This means that it can be used for any Internet site, whether personal or institutional, non-profit or commercial.
CMS with a focus on collaborative edition and multilingualism
Source: [spip.net](http://www.spip.net/en_rubrique25.html)
**Shipped version:** 4.0.1~ynh1
**Shipped version:** 4.0.1
**Demo:** https://demo.spip.net/
## Screenshots
![](https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Logo_SPIP.png/220px-Logo_SPIP.png)
![](./doc/screenshots/220px-Logo_SPIP.png)
## Demo
* [Official demo](https://demo.spip.net/)
## Disclaimers / important information
## Configuration
How to configure this app: by an admin panel.
## Documentation
* Official documentation: https://www.spip.net
## YunoHost specific features
#### Multi-users support
* Are LDAP and HTTP auth supported? **Yes**
* Can the app be used by multiple users? **Yes**
#### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/spip/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/spip/)
## Migrate from SPIP2
**This is not considered as stable yet, please do it with care and only for testing!**
@ -68,17 +60,18 @@ Note that a cron job will be executed at some time after the end of this
command. You must wait that before doing any other application operations!
You should see that SPIP is installed after that.
## Links
## Documentation and resources
* Official app website: http://www.spip.net/
* Official user documentation: https://www.spip.net/en_rubrique57.html
* Official admin documentation: https://www.spip.net/en_rubrique209.html
* Upstream app code repository: https://git.spip.net/spip/spip
* YunoHost documentation for this app: https://yunohost.org/app_spip
* Report a bug: https://github.com/YunoHost-Apps/spip_ynh/issues
* App website: https://www.spip.net
* YunoHost website: https://yunohost.org/
---
## Developer info
## Developers info
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/spip_ynh/tree/testing).
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/spip_ynh/tree/testing).
To try the testing branch, please proceed like that.
```
@ -86,3 +79,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/spip_ynh/tree/testing
or
sudo yunohost app upgrade spip -u https://github.com/YunoHost-Apps/spip_ynh/tree/testing --debug
```
**More info regarding app packaging:** https://yunohost.org/packaging_apps

View file

@ -1,77 +1,69 @@
# SPIP pour YunoHost
[![Integration level](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/app/spip) ![](https://ci-apps.yunohost.org/ci/badges/spip.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/spip.maintain.svg)
[![Install SPIP with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=spip)
[![Niveau d'intégration](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/app/spip) ![](https://ci-apps.yunohost.org/ci/badges/spip.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/spip.maintain.svg)
[![Installer SPIP avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=spip)
*[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer SPIP rapidement et simplement sur un serveur Yunohost.
> *Ce package vous permet d'installer SPIP rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
## Vue d'ensemble
SPIP est un système de publication pour lInternet qui sattache particulièrement au fonctionnement collectif, au multilinguisme et à la facilité demploi. Cest un logiciel libre, distribué sous la licence GNU/GPL. Il peut ainsi être utilisé pour tout site Internet, quil soit associatif ou institutionnel, personnel ou marchand.
CMS conçu pour l'édition collaborative et le multilinguisme
Source: [spip.net](http://www.spip.net/fr_rubrique91.html)
**Version incluse :** 4.0.1~ynh1
**Version incluse:** 4.0.1
**Démo :** https://demo.spip.net/
## Captures d'écran
![](https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Logo_SPIP.png/220px-Logo_SPIP.png)
![](./doc/screenshots/220px-Logo_SPIP.png)
## Démo
* [Démo officielle](https://demo.spip.net/)
## Avertissements / informations importantes
## Configuration
Comment configurer cette application: via le panneau d'administration.
How to configure this app: by an admin panel.
## Documentation
#### Multi-users support
* Documentation officielle: https://www.spip.net
* Are LDAP and HTTP auth supported? **Yes**
* Can the app be used by multiple users? **Yes**
## Caractéristiques spécifiques YunoHost
## Migrate from SPIP2
#### Support multi-utilisateurs
**This is not considered as stable yet, please do it with care and only for testing!**
* L'authentification LDAP et HTTP est-elle prise en charge? **Oui**
* L'application peut-elle être utilisée par plusieurs utilisateurs? **Oui**
#### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/spip/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/spip/)
## Migration depuis SPIP2
**Ceci n'est pas encore considéré comme stable, veuillez le faire avec soin et uniquement pour test!**
Ce paquet gère la migration de SPIP2 vers SPIP. Pour cela, votre application SPIP2 doit être **à jour** dans YunoHost. Pour s'en assurer :
This package handle the migration from SPIP2 to SPIP. For that, your
SPIP2 application must be **up-to-date** in YunoHost. To ensure that, execute:
```bash
sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/spip2_ynh spip2 --debug
```
Vous devrez ensuite mettre à jour votre application SPIP2 avec ce dépôt.
Cela ne peut se faire qu'à partir de l'interface en ligne de commande - par exemple via SSH. Une fois connecté, il vous suffit d'exécuter ce qui suit :
You will then have to upgrade your SPIP2 application with this repository.
This can only be done from the command-line interface - e.g. through SSH. Once you're connected, you simply have to execute the following:
```bash
sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/spip_ynh spip2 --debug
```
L'option `--debug` vous permettra de voir la sortie complète. Si vous rencontrez un problème, veuillez ouvrir une issue.
The `--debug` option will let you see the full output. If you encounter any issue, please paste it.
Notez qu'une tâche cron sera exécutée après la fin de cette commande. Vous devez attendre cela avant de faire toute autre opération d'application ! Vous devriez voir que SPIP est installé après cela.
Note that a cron job will be executed at some time after the end of this
command. You must wait that before doing any other application operations!
You should see that SPIP is installed after that.
## Links
## Documentations et ressources
* Signaler un bug: https://github.com/YunoHost-Apps/spip_ynh/issues
* Site de l'application: https://www.spip.net
* Site web YunoHost: https://yunohost.org/
---
* Site officiel de l'app : http://www.spip.net/
* Documentation officielle utilisateur : https://www.spip.net/en_rubrique57.html
* Documentation officielle de l'admin : https://www.spip.net/en_rubrique209.html
* Dépôt de code officiel de l'app : https://git.spip.net/spip/spip
* Documentation YunoHost pour cette app : https://yunohost.org/app_spip
* Signaler un bug : https://github.com/YunoHost-Apps/spip_ynh/issues
## Informations pour les développeurs
@ -83,3 +75,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/spip_ynh/tree/testing
ou
sudo yunohost app upgrade spip -u https://github.com/YunoHost-Apps/spip_ynh/tree/testing --debug
```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps

29
doc/DISCLAIMER _fr.md Normal file
View file

@ -0,0 +1,29 @@
## Configuration
Comment configurer cette application: via le panneau d'administration.
#### Support multi-utilisateurs
* L'authentification LDAP et HTTP est-elle prise en charge? **Oui**
* L'application peut-elle être utilisée par plusieurs utilisateurs? **Oui**
## Migration depuis SPIP2
**Ceci n'est pas encore considéré comme stable, veuillez le faire avec soin et uniquement pour test!**
Ce paquet gère la migration de SPIP2 vers SPIP. Pour cela, votre application SPIP2 doit être **à jour** dans YunoHost. Pour s'en assurer :
```bash
sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/spip2_ynh spip2 --debug
```
Vous devrez ensuite mettre à jour votre application SPIP2 avec ce dépôt.
Cela ne peut se faire qu'à partir de l'interface en ligne de commande - par exemple via SSH. Une fois connecté, il vous suffit d'exécuter ce qui suit :
```bash
sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/spip_ynh spip2 --debug
```
L'option `--debug` vous permettra de voir la sortie complète. Si vous rencontrez un problème, veuillez ouvrir une issue.
Notez qu'une tâche cron sera exécutée après la fin de cette commande. Vous devez attendre cela avant de faire toute autre opération d'application ! Vous devriez voir que SPIP est installé après cela.

32
doc/DISCLAIMER.md Normal file
View file

@ -0,0 +1,32 @@
## Configuration
How to configure this app: by an admin panel.
#### Multi-users support
* Are LDAP and HTTP auth supported? **Yes**
* Can the app be used by multiple users? **Yes**
## Migrate from SPIP2
**This is not considered as stable yet, please do it with care and only for testing!**
This package handle the migration from SPIP2 to SPIP. For that, your
SPIP2 application must be **up-to-date** in YunoHost. To ensure that, execute:
```bash
sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/spip2_ynh spip2 --debug
```
You will then have to upgrade your SPIP2 application with this repository.
This can only be done from the command-line interface - e.g. through SSH. Once you're connected, you simply have to execute the following:
```bash
sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/spip_ynh spip2 --debug
```
The `--debug` option will let you see the full output. If you encounter any issue, please paste it.
Note that a cron job will be executed at some time after the end of this
command. You must wait that before doing any other application operations!
You should see that SPIP is installed after that.

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -8,6 +8,14 @@
},
"version": "4.0.1~ynh1",
"url": "http://www.spip.net/",
"upstream": {
"license": "GPL-3.0-or-later",
"website": "http://www.spip.net/",
"demo": "https://demo.spip.net/",
"admindoc": "https://www.spip.net/en_rubrique209.html",
"userdoc": "https://www.spip.net/en_rubrique57.html",
"code": "https://git.spip.net/spip/spip"
},
"license": "GPL-3.0-or-later",
"maintainer": {
"name": "cyp",
@ -53,7 +61,11 @@
"en": "Choose the status of YunoHost users",
"fr": "Choisissez le status des utilisateurs de YunoHost"
},
"choices": ["Administrator", "Editor", "Visitor"],
"choices": [
"Administrator",
"Editor",
"Visitor"
],
"default": "Editor"
}
]