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:
parent
b0856007aa
commit
422a4a521c
3 changed files with 10 additions and 12 deletions
|
@ -113,10 +113,8 @@ RUN set -ex; \
|
|||
gnupg \
|
||||
; \
|
||||
\
|
||||
curl -fsSL -o nextcloud.tar.bz2 \
|
||||
"%%BASE_DOWNLOAD_URL%%/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \
|
||||
curl -fsSL -o nextcloud.tar.bz2.asc \
|
||||
"%%BASE_DOWNLOAD_URL%%/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc"; \
|
||||
curl -fsSL -o nextcloud.tar.bz2 "%%DOWNLOAD_URL%%"; \
|
||||
curl -fsSL -o nextcloud.tar.bz2.asc "%%DOWNLOAD_URL_ASC%%"; \
|
||||
export GNUPGHOME="$(mktemp -d)"; \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
|
||||
|
|
|
@ -127,10 +127,8 @@ RUN set -ex; \
|
|||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends $fetchDeps; \
|
||||
\
|
||||
curl -fsSL -o nextcloud.tar.bz2 \
|
||||
"%%BASE_DOWNLOAD_URL%%/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \
|
||||
curl -fsSL -o nextcloud.tar.bz2.asc \
|
||||
"%%BASE_DOWNLOAD_URL%%/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc"; \
|
||||
curl -fsSL -o nextcloud.tar.bz2 "%%DOWNLOAD_URL%%"; \
|
||||
curl -fsSL -o nextcloud.tar.bz2.asc "%%DOWNLOAD_URL_ASC%%"; \
|
||||
export GNUPGHOME="$(mktemp -d)"; \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
|
||||
|
|
10
update.sh
10
update.sh
|
@ -100,6 +100,8 @@ function create_variant() {
|
|||
debianVersion=${debian_version[$version]-${debian_version[default]}}
|
||||
phpVersion=${php_version[$version]-${php_version[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.
|
||||
mkdir -p "$dir"
|
||||
|
@ -117,7 +119,8 @@ function create_variant() {
|
|||
s/%%PHP_VERSION%%/'"$phpVersion"'/g;
|
||||
s/%%VARIANT%%/'"$variant"'/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|%%VARIANT_EXTRAS%%|'"${extras[$variant]}"'|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}' | \
|
||||
sort -urV ) )
|
||||
versions=( $( printf '%s\n' "${fullversions[@]}" | cut -d. -f1 | sort -urV ) )
|
||||
|
||||
for version in "${versions[@]}"; do
|
||||
fullversion="$( printf '%s\n' "${fullversions[@]}" | grep -E "^$version" | head -1 )"
|
||||
|
||||
if version_greater_or_equal "$version" "$min_version"; then
|
||||
|
||||
for variant in "${variants[@]}"; do
|
||||
|
||||
create_variant "$version" "https:\/\/download.nextcloud.com\/server\/releases"
|
||||
create_variant "$version"
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue