Skip to content

Commit 38b8110

Browse files
author
GitHub Workflow
committed
Runs update.sh
1 parent a68c6ef commit 38b8110

9 files changed

Lines changed: 45 additions & 0 deletions

File tree

25/apache/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
157157
if version_greater "$image_version" "$installed_version"; then
158158
echo "Initializing nextcloud $image_version ..."
159159
if [ "$installed_version" != "0.0.0.0" ]; then
160+
if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then
161+
echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported."
162+
echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16."
163+
exit 1
164+
fi
160165
echo "Upgrading nextcloud from $installed_version ..."
161166
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
162167
fi

25/fpm-alpine/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
157157
if version_greater "$image_version" "$installed_version"; then
158158
echo "Initializing nextcloud $image_version ..."
159159
if [ "$installed_version" != "0.0.0.0" ]; then
160+
if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then
161+
echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported."
162+
echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16."
163+
exit 1
164+
fi
160165
echo "Upgrading nextcloud from $installed_version ..."
161166
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
162167
fi

25/fpm/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
157157
if version_greater "$image_version" "$installed_version"; then
158158
echo "Initializing nextcloud $image_version ..."
159159
if [ "$installed_version" != "0.0.0.0" ]; then
160+
if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then
161+
echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported."
162+
echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16."
163+
exit 1
164+
fi
160165
echo "Upgrading nextcloud from $installed_version ..."
161166
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
162167
fi

26/apache/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
157157
if version_greater "$image_version" "$installed_version"; then
158158
echo "Initializing nextcloud $image_version ..."
159159
if [ "$installed_version" != "0.0.0.0" ]; then
160+
if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then
161+
echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported."
162+
echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16."
163+
exit 1
164+
fi
160165
echo "Upgrading nextcloud from $installed_version ..."
161166
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
162167
fi

26/fpm-alpine/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
157157
if version_greater "$image_version" "$installed_version"; then
158158
echo "Initializing nextcloud $image_version ..."
159159
if [ "$installed_version" != "0.0.0.0" ]; then
160+
if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then
161+
echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported."
162+
echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16."
163+
exit 1
164+
fi
160165
echo "Upgrading nextcloud from $installed_version ..."
161166
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
162167
fi

26/fpm/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
157157
if version_greater "$image_version" "$installed_version"; then
158158
echo "Initializing nextcloud $image_version ..."
159159
if [ "$installed_version" != "0.0.0.0" ]; then
160+
if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then
161+
echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported."
162+
echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16."
163+
exit 1
164+
fi
160165
echo "Upgrading nextcloud from $installed_version ..."
161166
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
162167
fi

27/apache/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
157157
if version_greater "$image_version" "$installed_version"; then
158158
echo "Initializing nextcloud $image_version ..."
159159
if [ "$installed_version" != "0.0.0.0" ]; then
160+
if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then
161+
echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported."
162+
echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16."
163+
exit 1
164+
fi
160165
echo "Upgrading nextcloud from $installed_version ..."
161166
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
162167
fi

27/fpm-alpine/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
157157
if version_greater "$image_version" "$installed_version"; then
158158
echo "Initializing nextcloud $image_version ..."
159159
if [ "$installed_version" != "0.0.0.0" ]; then
160+
if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then
161+
echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported."
162+
echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16."
163+
exit 1
164+
fi
160165
echo "Upgrading nextcloud from $installed_version ..."
161166
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
162167
fi

27/fpm/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
157157
if version_greater "$image_version" "$installed_version"; then
158158
echo "Initializing nextcloud $image_version ..."
159159
if [ "$installed_version" != "0.0.0.0" ]; then
160+
if [ "${image_version%%.*}" -gt "$((${installed_version%%.*} + 1))" ]; then
161+
echo "Can't start Nextcloud because upgrading from $installed_version to $image_version is not supported."
162+
echo "It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16."
163+
exit 1
164+
fi
160165
echo "Upgrading nextcloud from $installed_version ..."
161166
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
162167
fi

0 commit comments

Comments
 (0)