diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2019-08-08 03:31:00 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2019-08-08 03:31:00 +0000 |
commit | a01cc01896f6fb3b472622711d632100b3c86cdb (patch) | |
tree | 21fb15bbd40fabb290446ee3aa09e491306f2a87 /user/nextcloud/nextcloud.post-upgrade | |
parent | 5c572c8c2013c5833d041ea4411a189d85f312fa (diff) | |
parent | 3f98aef31c277c4f673d3ad9db6b11b6e973ea5e (diff) | |
download | packages-a01cc01896f6fb3b472622711d632100b3c86cdb.tar.gz packages-a01cc01896f6fb3b472622711d632100b3c86cdb.tar.bz2 packages-a01cc01896f6fb3b472622711d632100b3c86cdb.tar.xz packages-a01cc01896f6fb3b472622711d632100b3c86cdb.zip |
Merge branch 'sr.2019.08.06' into 'master'
Misc package bumps for Maintainer: Max Rees, 2019.08.06
See merge request adelie/packages!313
Diffstat (limited to 'user/nextcloud/nextcloud.post-upgrade')
-rw-r--r-- | user/nextcloud/nextcloud.post-upgrade | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/user/nextcloud/nextcloud.post-upgrade b/user/nextcloud/nextcloud.post-upgrade index e4ad291ac..8c48296ad 100644 --- a/user/nextcloud/nextcloud.post-upgrade +++ b/user/nextcloud/nextcloud.post-upgrade @@ -3,6 +3,59 @@ ver_new="$1" ver_old="$2" +maj_new="${ver_new%%.*}" +maj_old="${ver_old%%.*}" +maj_diff="$((maj_new - maj_old))" + +if [ "$(apk version -t "$ver_old" "14.0.13-r0")" = "<" ]; then + cat >&2 <<-EOF + * + * Some of Nextcloud's versions may be out of sync. + * You can check by running: + * + * apk info -v | grep '^nextcloud-.*-$ver_old' + EOF +fi + +if [ "$maj_diff" -lt 0 ]; then + cat >&2 <<-EOF + * + * Warning: Nextcloud does not support downgrading major versions. + * Only run "occ upgrade" if you have skipped major versions + * and are in the middle of fixing that! + * + EOF + exit 0 +fi + +if [ "$maj_diff" -gt 1 ]; then + cat >&2 <<-EOF + * + * Warning: Nextcloud does not support skipping major versions. + * Try the following instead: + * + EOF + + maj_old="$((maj_old + 1))" + while [ "$maj_old" -lt "$maj_new" ]; do + cat >&2 <<-EOF + * apk add nextcloud~$maj_old + * occ upgrade + EOF + maj_old="$((maj_old + 1))" + done + cat >&2 <<-EOF + * apk add nextcloud + * occ upgrade + * + EOF + exit 0 +fi + if [ "${ver_new%-r*}" != "${ver_old%-r*}" ]; then - echo '* Run "occ upgrade" to finish upgrade of your NextCloud instance!' >&2 + cat >&2 <<-EOF + * + * Run "occ upgrade" to finish upgrade of your Nextcloud instance! + * + EOF fi |