diff options
author | Max Rees <maxcrees@me.com> | 2019-08-06 20:26:18 -0500 |
---|---|---|
committer | Max Rees <maxcrees@me.com> | 2019-08-06 20:45:50 -0500 |
commit | 3f98aef31c277c4f673d3ad9db6b11b6e973ea5e (patch) | |
tree | d195843dc9ee45a88a6c3e195e4c03568d188cd5 /user/nextcloud/nextcloud.post-upgrade | |
parent | 23ff693e4add6aa38f3d04190acd4d74f9b7f5cc (diff) | |
download | packages-3f98aef31c277c4f673d3ad9db6b11b6e973ea5e.tar.gz packages-3f98aef31c277c4f673d3ad9db6b11b6e973ea5e.tar.bz2 packages-3f98aef31c277c4f673d3ad9db6b11b6e973ea5e.tar.xz packages-3f98aef31c277c4f673d3ad9db6b11b6e973ea5e.zip |
user/nextcloud: bump to 14.0.13
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 |