mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
commit
e38fe02f5d
5 changed files with 22 additions and 7 deletions
|
@ -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
|
||||
|
||||

|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue