-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from YunoHost-Apps/testing
Upgrade
- Loading branch information
Showing
16 changed files
with
325 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
|
@@ -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", | ||
|
@@ -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", | ||
|
@@ -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 | ||
} | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.