0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-21 03:06:08 +02:00

Replace %%BASE_DOWNLOAD_URL%% placeholder by %%DOWNLOAD_URL{_ASC}%%

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
This commit is contained in:
Daniel Rudolf 2023-05-29 13:08:44 +02:00
parent b0856007aa
commit 422a4a521c
No known key found for this signature in database
GPG key ID: A061F02CD8DE4538
3 changed files with 10 additions and 12 deletions

View file

@ -113,10 +113,8 @@ RUN set -ex; \
gnupg \ gnupg \
; \ ; \
\ \
curl -fsSL -o nextcloud.tar.bz2 \ curl -fsSL -o nextcloud.tar.bz2 "%%DOWNLOAD_URL%%"; \
"%%BASE_DOWNLOAD_URL%%/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \ curl -fsSL -o nextcloud.tar.bz2.asc "%%DOWNLOAD_URL_ASC%%"; \
curl -fsSL -o nextcloud.tar.bz2.asc \
"%%BASE_DOWNLOAD_URL%%/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc"; \
export GNUPGHOME="$(mktemp -d)"; \ export GNUPGHOME="$(mktemp -d)"; \
# gpg key from https://nextcloud.com/nextcloud.asc # gpg key from https://nextcloud.com/nextcloud.asc
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \

View file

@ -127,10 +127,8 @@ RUN set -ex; \
apt-get update; \ apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \ apt-get install -y --no-install-recommends $fetchDeps; \
\ \
curl -fsSL -o nextcloud.tar.bz2 \ curl -fsSL -o nextcloud.tar.bz2 "%%DOWNLOAD_URL%%"; \
"%%BASE_DOWNLOAD_URL%%/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \ curl -fsSL -o nextcloud.tar.bz2.asc "%%DOWNLOAD_URL_ASC%%"; \
curl -fsSL -o nextcloud.tar.bz2.asc \
"%%BASE_DOWNLOAD_URL%%/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc"; \
export GNUPGHOME="$(mktemp -d)"; \ export GNUPGHOME="$(mktemp -d)"; \
# gpg key from https://nextcloud.com/nextcloud.asc # gpg key from https://nextcloud.com/nextcloud.asc
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \

View file

@ -100,6 +100,8 @@ function create_variant() {
debianVersion=${debian_version[$version]-${debian_version[default]}} debianVersion=${debian_version[$version]-${debian_version[default]}}
phpVersion=${php_version[$version]-${php_version[default]}} phpVersion=${php_version[$version]-${php_version[default]}}
crontabInt=${crontab_int[$version]-${crontab_int[default]}} crontabInt=${crontab_int[$version]-${crontab_int[default]}}
url="https://download.nextcloud.com/server/releases/nextcloud-$fullversion.tar.bz2"
ascUrl="https://download.nextcloud.com/server/releases/nextcloud-$fullversion.tar.bz2.asc"
# Create the version+variant directory with a Dockerfile. # Create the version+variant directory with a Dockerfile.
mkdir -p "$dir" mkdir -p "$dir"
@ -117,7 +119,8 @@ function create_variant() {
s/%%PHP_VERSION%%/'"$phpVersion"'/g; s/%%PHP_VERSION%%/'"$phpVersion"'/g;
s/%%VARIANT%%/'"$variant"'/g; s/%%VARIANT%%/'"$variant"'/g;
s/%%VERSION%%/'"$fullversion"'/g; s/%%VERSION%%/'"$fullversion"'/g;
s/%%BASE_DOWNLOAD_URL%%/'"$2"'/g; s/%%DOWNLOAD_URL%%/'"$(sed -e 's/[\/&]/\\&/g' <<< "$url")"'/g;
s/%%DOWNLOAD_URL_ASC%%/'"$(sed -e 's/[\/&]/\\&/g' <<< "$ascUrl")"'/g;
s/%%CMD%%/'"${cmd[$variant]}"'/g; s/%%CMD%%/'"${cmd[$variant]}"'/g;
s|%%VARIANT_EXTRAS%%|'"${extras[$variant]}"'|g; s|%%VARIANT_EXTRAS%%|'"${extras[$variant]}"'|g;
s/%%APCU_VERSION%%/'"${pecl_versions[APCu]}"'/g; s/%%APCU_VERSION%%/'"${pecl_versions[APCu]}"'/g;
@ -175,14 +178,13 @@ fullversions=( $( curl -fsSL 'https://download.nextcloud.com/server/releases/' |
grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}' | \ grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}' | \
sort -urV ) ) sort -urV ) )
versions=( $( printf '%s\n' "${fullversions[@]}" | cut -d. -f1 | sort -urV ) ) versions=( $( printf '%s\n' "${fullversions[@]}" | cut -d. -f1 | sort -urV ) )
for version in "${versions[@]}"; do for version in "${versions[@]}"; do
fullversion="$( printf '%s\n' "${fullversions[@]}" | grep -E "^$version" | head -1 )" fullversion="$( printf '%s\n' "${fullversions[@]}" | grep -E "^$version" | head -1 )"
if version_greater_or_equal "$version" "$min_version"; then if version_greater_or_equal "$version" "$min_version"; then
for variant in "${variants[@]}"; do for variant in "${variants[@]}"; do
create_variant "$version"
create_variant "$version" "https:\/\/download.nextcloud.com\/server\/releases"
done done
fi fi
done done