From 84dceee28d8fb53ba04458d42146dd65228e73a1 Mon Sep 17 00:00:00 2001 From: Philipp Date: Wed, 22 Jun 2022 20:43:31 +0200 Subject: [PATCH] Fix missing /usr/src/friendica/VERSION error --- 2022.03/apache/entrypoint.sh | 7 ++++++- 2022.03/fpm-alpine/entrypoint.sh | 7 ++++++- 2022.03/fpm/entrypoint.sh | 7 ++++++- 2022.06/apache/entrypoint.sh | 7 ++++++- 2022.06/fpm-alpine/entrypoint.sh | 7 ++++++- 2022.06/fpm/entrypoint.sh | 7 ++++++- 2022.09-dev/apache/entrypoint.sh | 7 ++++++- 2022.09-dev/fpm-alpine/entrypoint.sh | 7 ++++++- 2022.09-dev/fpm/entrypoint.sh | 7 ++++++- docker-entrypoint.sh | 7 ++++++- 10 files changed, 60 insertions(+), 10 deletions(-) diff --git a/2022.03/apache/entrypoint.sh b/2022.03/apache/entrypoint.sh index 87dcbe2..d659dd4 100755 --- a/2022.03/apache/entrypoint.sh +++ b/2022.03/apache/entrypoint.sh @@ -74,7 +74,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="0.0.0.0" + if [ -f /usr/src/friendica/VERSION ]; then + image_version="$(cat /usr/src/friendica/VERSION)" + else + echo "No new Friendica sources found (enable FRIENDICA_UPGRADE for new sources)" + fi # no downgrading possible if version_greater "$installed_version" "$image_version"; then diff --git a/2022.03/fpm-alpine/entrypoint.sh b/2022.03/fpm-alpine/entrypoint.sh index 87dcbe2..d659dd4 100755 --- a/2022.03/fpm-alpine/entrypoint.sh +++ b/2022.03/fpm-alpine/entrypoint.sh @@ -74,7 +74,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="0.0.0.0" + if [ -f /usr/src/friendica/VERSION ]; then + image_version="$(cat /usr/src/friendica/VERSION)" + else + echo "No new Friendica sources found (enable FRIENDICA_UPGRADE for new sources)" + fi # no downgrading possible if version_greater "$installed_version" "$image_version"; then diff --git a/2022.03/fpm/entrypoint.sh b/2022.03/fpm/entrypoint.sh index 87dcbe2..d659dd4 100755 --- a/2022.03/fpm/entrypoint.sh +++ b/2022.03/fpm/entrypoint.sh @@ -74,7 +74,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="0.0.0.0" + if [ -f /usr/src/friendica/VERSION ]; then + image_version="$(cat /usr/src/friendica/VERSION)" + else + echo "No new Friendica sources found (enable FRIENDICA_UPGRADE for new sources)" + fi # no downgrading possible if version_greater "$installed_version" "$image_version"; then diff --git a/2022.06/apache/entrypoint.sh b/2022.06/apache/entrypoint.sh index 87dcbe2..d659dd4 100755 --- a/2022.06/apache/entrypoint.sh +++ b/2022.06/apache/entrypoint.sh @@ -74,7 +74,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="0.0.0.0" + if [ -f /usr/src/friendica/VERSION ]; then + image_version="$(cat /usr/src/friendica/VERSION)" + else + echo "No new Friendica sources found (enable FRIENDICA_UPGRADE for new sources)" + fi # no downgrading possible if version_greater "$installed_version" "$image_version"; then diff --git a/2022.06/fpm-alpine/entrypoint.sh b/2022.06/fpm-alpine/entrypoint.sh index 87dcbe2..d659dd4 100755 --- a/2022.06/fpm-alpine/entrypoint.sh +++ b/2022.06/fpm-alpine/entrypoint.sh @@ -74,7 +74,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="0.0.0.0" + if [ -f /usr/src/friendica/VERSION ]; then + image_version="$(cat /usr/src/friendica/VERSION)" + else + echo "No new Friendica sources found (enable FRIENDICA_UPGRADE for new sources)" + fi # no downgrading possible if version_greater "$installed_version" "$image_version"; then diff --git a/2022.06/fpm/entrypoint.sh b/2022.06/fpm/entrypoint.sh index 87dcbe2..d659dd4 100755 --- a/2022.06/fpm/entrypoint.sh +++ b/2022.06/fpm/entrypoint.sh @@ -74,7 +74,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="0.0.0.0" + if [ -f /usr/src/friendica/VERSION ]; then + image_version="$(cat /usr/src/friendica/VERSION)" + else + echo "No new Friendica sources found (enable FRIENDICA_UPGRADE for new sources)" + fi # no downgrading possible if version_greater "$installed_version" "$image_version"; then diff --git a/2022.09-dev/apache/entrypoint.sh b/2022.09-dev/apache/entrypoint.sh index 87dcbe2..d659dd4 100755 --- a/2022.09-dev/apache/entrypoint.sh +++ b/2022.09-dev/apache/entrypoint.sh @@ -74,7 +74,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="0.0.0.0" + if [ -f /usr/src/friendica/VERSION ]; then + image_version="$(cat /usr/src/friendica/VERSION)" + else + echo "No new Friendica sources found (enable FRIENDICA_UPGRADE for new sources)" + fi # no downgrading possible if version_greater "$installed_version" "$image_version"; then diff --git a/2022.09-dev/fpm-alpine/entrypoint.sh b/2022.09-dev/fpm-alpine/entrypoint.sh index 87dcbe2..d659dd4 100755 --- a/2022.09-dev/fpm-alpine/entrypoint.sh +++ b/2022.09-dev/fpm-alpine/entrypoint.sh @@ -74,7 +74,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="0.0.0.0" + if [ -f /usr/src/friendica/VERSION ]; then + image_version="$(cat /usr/src/friendica/VERSION)" + else + echo "No new Friendica sources found (enable FRIENDICA_UPGRADE for new sources)" + fi # no downgrading possible if version_greater "$installed_version" "$image_version"; then diff --git a/2022.09-dev/fpm/entrypoint.sh b/2022.09-dev/fpm/entrypoint.sh index 87dcbe2..d659dd4 100755 --- a/2022.09-dev/fpm/entrypoint.sh +++ b/2022.09-dev/fpm/entrypoint.sh @@ -74,7 +74,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="0.0.0.0" + if [ -f /usr/src/friendica/VERSION ]; then + image_version="$(cat /usr/src/friendica/VERSION)" + else + echo "No new Friendica sources found (enable FRIENDICA_UPGRADE for new sources)" + fi # no downgrading possible if version_greater "$installed_version" "$image_version"; then diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 87dcbe2..d659dd4 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -74,7 +74,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="0.0.0.0" + if [ -f /usr/src/friendica/VERSION ]; then + image_version="$(cat /usr/src/friendica/VERSION)" + else + echo "No new Friendica sources found (enable FRIENDICA_UPGRADE for new sources)" + fi # no downgrading possible if version_greater "$installed_version" "$image_version"; then