Skip to content

Commit

Permalink
Merge pull request #72 from YunoHost-Apps/testing
Browse files Browse the repository at this point in the history
Upgrade
  • Loading branch information
yalh76 authored Aug 15, 2022
2 parents 0dae4f3 + 4bf35e6 commit 2be500c
Show file tree
Hide file tree
Showing 16 changed files with 325 additions and 136 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/updater.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/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://github.com/")[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://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1)

# 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
echo "REPO=$repo" >> $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

#=================================================
# 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
49 changes: 49 additions & 0 deletions .github/workflows/updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow allows GitHub Actions to automagically update your app whenever a new upstream release is detected.
# You need to enable Actions in your repository settings, and fetch this Action from the YunoHost-Apps organization.
# This file should be enough by itself, but feel free to tune it to your needs.
# It calls updater.sh, which is where you should put the app-specific update steps.
name: Check for new upstream releases
on:
# Allow to manually trigger the workflow
workflow_dispatch:
# Run it every day at 6:00 UTC
schedule:
- cron: '0 6 * * *'
jobs:
updater:
runs-on: ubuntu-latest
steps:
- name: Fetch the source code
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run the updater script
id: run_updater
run: |
# Setting up Git user
git config --global user.name 'yunohost-bot'
git config --global user.email '[email protected]'
# Run the updater script
/bin/bash .github/workflows/updater.sh
- name: Commit changes
id: commit
if: ${{ env.PROCEED == 'true' }}
run: |
git commit -am "Upgrade to v$VERSION"
- name: Create Pull Request
id: cpr
if: ${{ env.PROCEED == 'true' }}
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update to version ${{ env.VERSION }}
committer: 'yunohost-bot <[email protected]>'
author: 'yunohost-bot <[email protected]>'
signoff: false
base: testing
branch: ci-auto-update-v${{ env.VERSION }}
delete-branch: true
title: 'Upgrade to version ${{ env.VERSION }}'
body: |
Upgrade to v${{ env.VERSION }}
draft: false
35 changes: 24 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ It shall NOT be edited by hand.

# OnlyOffice for YunoHost

[![Integration level](https://dash.yunohost.org/integration/onlyoffice.svg)](https://dash.yunohost.org/appci/app/onlyoffice) ![](https://ci-apps.yunohost.org/ci/badges/onlyoffice.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/onlyoffice.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/onlyoffice.svg)](https://dash.yunohost.org/appci/app/onlyoffice) ![Working status](https://ci-apps.yunohost.org/ci/badges/onlyoffice.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/onlyoffice.maintain.svg)
[![Install OnlyOffice with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=onlyoffice)

*[Lire ce readme en français.](./README_fr.md)*
Expand All @@ -15,16 +15,28 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in

## Overview

Create and edit documents collaboratively
OnlyOffice Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.

**Shipped version:** 6.4.0~ynh2
Online collaborative edition of OnlyOffice documents requires:
1. a server part, with two installation options:
1. OnlyOffice Document Server packaged for YunoHost.
2. The [Community Document Server for Nextcloud](https://apps.nextcloud.com/apps/documentserver_community)

2. a client part, such as:
1. The [ONLYOFFICE connector for Nextcloud](https://apps.nextcloud.com/apps/onlyoffice)
2. The [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx)

The Nextcloud addicts may follow [this tutorial](https://github.com/YunoHost-Apps/nextcloud_ynh#configure-onlyoffice-integration) to install (1.ii) and (2.i) on one Nextcloud instance. However, performance and architecture are limited.


**Shipped version:** 7.1.0~ynh1

**Demo:** https://www.onlyoffice.com/fr/download-desktop.aspx

## Screenshots

![](./doc/screenshots/.DS_Store)
![](./doc/screenshots/document-short.png)
![Screenshot of OnlyOffice](./doc/screenshots/.DS_Store)
![Screenshot of OnlyOffice](./doc/screenshots/document-short.png)

## Disclaimers / important information

Expand Down Expand Up @@ -78,20 +90,21 @@ Prerequisite: **OnlyOffice should be public**, see previous section.

## Documentation and resources

* Official app website: https://www.onlyoffice.com
* Upstream app code repository: https://github.com/ONLYOFFICE/DocumentServer
* YunoHost documentation for this app: https://yunohost.org/app_onlyoffice
* Report a bug: https://github.com/YunoHost-Apps/onlyoffice_ynh/issues
* Official app website: <https://www.onlyoffice.com>
* Upstream app code repository: <https://github.com/ONLYOFFICE/DocumentServer>
* YunoHost documentation for this app: <https://yunohost.org/app_onlyoffice>
* Report a bug: <https://github.com/YunoHost-Apps/onlyoffice_ynh/issues>

## Developer info

Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/onlyoffice_ynh/tree/testing).

To try the testing branch, please proceed like that.
```

``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/onlyoffice_ynh/tree/testing --debug
or
sudo yunohost app upgrade onlyoffice -u https://github.com/YunoHost-Apps/onlyoffice_ynh/tree/testing --debug
```

**More info regarding app packaging:** https://yunohost.org/packaging_apps
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>
41 changes: 29 additions & 12 deletions README_fr.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,42 @@
<!--
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.
-->

# OnlyOffice pour YunoHost

[![Niveau d'intégration](https://dash.yunohost.org/integration/onlyoffice.svg)](https://dash.yunohost.org/appci/app/onlyoffice) ![](https://ci-apps.yunohost.org/ci/badges/onlyoffice.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/onlyoffice.maintain.svg)
[![Niveau d'intégration](https://dash.yunohost.org/integration/onlyoffice.svg)](https://dash.yunohost.org/appci/app/onlyoffice) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/onlyoffice.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/onlyoffice.maintain.svg)
[![Installer OnlyOffice avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=onlyoffice)

*[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*

> *Ce package vous permet d'installer OnlyOffice 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

Créez et éditer des documents collaborativement
OnlyOffice Document Server est une suite bureautique en ligne comprenant des visualiseurs et des éditeurs de textes, feuilles de calcul et présentations, entièrement compatible avec les formats Office Open XML: .docx, .xlsx, .pptx et permettant l'édition collaborative en temps réel.

L'édition collaborative en ligne des documents OnlyOffice nécessite :
1. une partie serveur, avec deux options d'installation :
1. OnlyOffice Document Server packagé pour YunoHost.
2. Le [Community Document Server pour Nextcloud](https://apps.nextcloud.com/apps/documentserver_community).

2. une partie client, telle que :
1. [ONLYOFFICE connector pour Nextcloud](https://apps.nextcloud.com/apps/onlyoffice)
2. [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx)

Les utilisateurs de Nextcloud peuvent suivre [ce tutoriel](https://github.com/YunoHost-Apps/nextcloud_ynh/blob/testing/README_fr.md#configurer-lint%C3%A9gration-donlyoffice) pour installer le Community Document Server (1.ii) et ONLYOFFICE connector (2.i) sur une instance Nextcloud. Cependant, les performances et l'architecture sont limitées.

**Version incluse :** 6.4.0~ynh2

**Version incluse :** 7.1.0~ynh1

**Démo :** https://www.onlyoffice.com/fr/download-desktop.aspx

## Captures d'écran

![](./doc/screenshots/.DS_Store)
![](./doc/screenshots/document-short.png)
![Capture d'écran de OnlyOffice](./doc/screenshots/.DS_Store)
![Capture d'écran de OnlyOffice](./doc/screenshots/document-short.png)

## Avertissements / informations importantes

Expand Down Expand Up @@ -74,20 +90,21 @@ Prérequis : **OnlyOffice doit être public**, voir la section précédente.

## Documentations et ressources

* Site officiel de l'app : https://www.onlyoffice.com
* Dépôt de code officiel de l'app : https://github.com/ONLYOFFICE/DocumentServer
* Documentation YunoHost pour cette app : https://yunohost.org/app_onlyoffice
* Signaler un bug : https://github.com/YunoHost-Apps/onlyoffice_ynh/issues
* Site officiel de l'app : <https://www.onlyoffice.com>
* Dépôt de code officiel de l'app : <https://github.com/ONLYOFFICE/DocumentServer>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_onlyoffice>
* Signaler un bug : <https://github.com/YunoHost-Apps/onlyoffice_ynh/issues>

## Informations pour les développeurs

Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/onlyoffice_ynh/tree/testing).

Pour essayer la branche testing, procédez comme suit.
```

``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/onlyoffice_ynh/tree/testing --debug
ou
sudo yunohost app upgrade onlyoffice -u https://github.com/YunoHost-Apps/onlyoffice_ynh/tree/testing --debug
```

**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>
3 changes: 2 additions & 1 deletion check_process
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
; Manifest
domain="domain.tld"
path="/path"
nextclouddomain="domain.tld"
is_public=1
nextclouddomain="domain.tld"
; Checks
pkg_linter=1
setup_sub_dir=1
Expand All @@ -15,6 +15,7 @@
upgrade=1 from_commit=eca1121ff00c59325227163109d11c46bbff8e03
backup_restore=1
multi_instance=0
port_already_use=0
change_url=1
;;; Options
Email=
Expand Down
Binary file removed doc/.DS_Store
Binary file not shown.
12 changes: 12 additions & 0 deletions doc/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
OnlyOffice Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.

Online collaborative edition of OnlyOffice documents requires:
1. a server part, with two installation options:
1. OnlyOffice Document Server packaged for YunoHost.
2. The [Community Document Server for Nextcloud](https://apps.nextcloud.com/apps/documentserver_community)

2. a client part, such as:
1. The [ONLYOFFICE connector for Nextcloud](https://apps.nextcloud.com/apps/onlyoffice)
2. The [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx)

The Nextcloud addicts may follow [this tutorial](https://github.com/YunoHost-Apps/nextcloud_ynh#configure-onlyoffice-integration) to install (1.ii) and (2.i) on one Nextcloud instance. However, performance and architecture are limited.
12 changes: 12 additions & 0 deletions doc/DESCRIPTION_fr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
OnlyOffice Document Server est une suite bureautique en ligne comprenant des visualiseurs et des éditeurs de textes, feuilles de calcul et présentations, entièrement compatible avec les formats Office Open XML: .docx, .xlsx, .pptx et permettant l'édition collaborative en temps réel.

L'édition collaborative en ligne des documents OnlyOffice nécessite :
1. une partie serveur, avec deux options d'installation :
1. OnlyOffice Document Server packagé pour YunoHost.
2. Le [Community Document Server pour Nextcloud](https://apps.nextcloud.com/apps/documentserver_community).

2. une partie client, telle que :
1. [ONLYOFFICE connector pour Nextcloud](https://apps.nextcloud.com/apps/onlyoffice)
2. [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx)

Les utilisateurs de Nextcloud peuvent suivre [ce tutoriel](https://github.com/YunoHost-Apps/nextcloud_ynh/blob/testing/README_fr.md#configurer-lint%C3%A9gration-donlyoffice) pour installer le Community Document Server (1.ii) et ONLYOFFICE connector (2.i) sur une instance Nextcloud. Cependant, les performances et l'architecture sont limitées.
28 changes: 14 additions & 14 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"en": "Create and edit documents collaboratively",
"fr": "Créez et éditer des documents collaborativement"
},
"version": "6.4.0~ynh2",
"version": "7.1.0~ynh1",
"url": "https://www.onlyoffice.com",
"upstream": {
"license": "GPL-3.0-or-later",
Expand All @@ -16,18 +16,18 @@
},
"license": "GPL-3.0-or-later",
"maintainer": {
"name": "liberodark",
"email": "[email protected]"
"name": "",
"email": ""
},
"requirements": {
"yunohost": ">= 4.2.0"
"yunohost": ">= 4.3.0"
},
"multi_instance": false,
"services": [
"nginx"
],
"arguments": {
"install" : [
"install": [
{
"name": "domain",
"type": "domain",
Expand All @@ -47,6 +47,15 @@
},
"default": "/onlyoffice"
},
{
"name": "is_public",
"type": "boolean",
"help": {
"en": "You will only be able to connect OnlyOffice to Nextcloud if both apps are public!",
"fr": "Nextcloud et OnlyOffice doivent être des applications publiques si vous voulez les connecter !"
},
"default": true
},
{
"name": "nextclouddomain",
"type": "string",
Expand All @@ -60,15 +69,6 @@
"fr": "Installez le connecteur OnlyOffice pour éditer des documents dans Nextcloud."
},
"default": "yunohost.domain/nextcloud"
},
{
"name": "is_public",
"type": "boolean",
"help": {
"en": "You will only be able to connect OnlyOffice to Nextcloud if both apps are public!",
"fr": "Nextcloud et OnlyOffice doivent être des applications publiques si vous voulez les connecter !"
},
"default": true
}
]
}
Expand Down
2 changes: 2 additions & 0 deletions scripts/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

# dependencies used by the app
pkg_dependencies="postgresql postgresql-contrib libstdc++6 rabbitmq-server libcurl4-dev"
contrib_dependencies="ttf-mscorefonts-installer"
extra_dependencies="onlyoffice-documentserver"

#=================================================
# PERSONAL HELPERS
Expand Down
Loading

0 comments on commit 2be500c

Please sign in to comment.