diff --git a/README.md b/README.md index fe5d440..4b1813f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Nextcloud for YunoHost own data. A personal cloud which run on your own server. With Nextcloud you can synchronize your files over your devices. -**Shipped version:** 10.0.1 +**Shipped version:** 11.0.0 ![](https://github.com/nextcloud/screenshots/blob/master/files/filelist.png) diff --git a/conf/nextcloud-deps.control b/conf/nextcloud-deps.control index 32c147d..f4adfd7 100644 --- a/conf/nextcloud-deps.control +++ b/conf/nextcloud-deps.control @@ -4,7 +4,7 @@ Homepage: https://owncloud.org/ Standards-Version: 3.9.2 Package: nextcloud-deps -Version: 10.0-1 +Version: 11.0-1 Depends: php5-gd, php5-json, php5-intl, php5-mcrypt , php5-curl, php5-apcu, php5-imagick , acl, tar, smbclient diff --git a/manifest.json b/manifest.json index 8a65e46..ebb2827 100644 --- a/manifest.json +++ b/manifest.json @@ -8,7 +8,7 @@ }, "url": "https://nextcloud.com", "license": "AGPL-3", - "version": "10.0.1", + "version": "11.0.0", "maintainer": { "name": "jerome", "email": "jerome@yunohost.org" diff --git a/scripts/_common.sh b/scripts/_common.sh index e6f2758..fcbfc4b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ APPNAME="nextcloud" # Nextcloud version -VERSION="10.0.1" +VERSION="11.0.0" # Package name for Nextcloud dependencies DEPS_PKG_NAME="nextcloud-deps" @@ -14,7 +14,7 @@ DEPS_PKG_NAME="nextcloud-deps" NEXTCLOUD_SOURCE_URL="https://download.nextcloud.com/server/releases/nextcloud-${VERSION}.tar.bz2" # Remote URL to fetch Nextcloud tarball checksum -NEXTCLOUD_SOURCE_SHA256="39412a28f02fd7ca8c9267b4ccf02ac28c1eb27995d77c06ceb2699375978b25" +NEXTCLOUD_SOURCE_SHA256="5bdfcb36c5cf470b9a6679034cabf88bf1e50a9f3e47c08d189cc2280b621429" # App package root directory should be the parent folder PKGDIR=$(cd ../; pwd) diff --git a/scripts/upgrade b/scripts/upgrade index a8e1afc..d06a36c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,7 +1,5 @@ #!/bin/bash -set -eu - # Load common variables and helpers source ./_common.sh @@ -10,6 +8,23 @@ app=$APPNAME dbname=$app dbuser=$app +# Backup the current version of the app, restore it if the upgrade fails +sudo yunohost backup delete $app-before-upgrade +sudo yunohost backup create --ignore-hooks --apps $app --name $app-before-upgrade +EXIT_PROPERLY () { + exit_code=$? + if [ "$exit_code" -eq 0 ]; then + exit 0 # Quitte sans erreur si le script se termine correctement. + fi + trap '' EXIT + set +eu + sudo yunohost app remove $app # Supprime l'application avant de la restaurer. + sudo yunohost backup restore --ignore-hooks $app-before-upgrade --apps $app --force # Restore the backup if upgrade failed + ynh_die "Upgrade failed. The app was restored to the way it was before the failed upgrade." +} +set -eu +trap EXIT_PROPERLY EXIT + # Source app helpers source /usr/share/yunohost/helpers