0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-25 12:50:54 +02:00

Add images for Release Candidates

This commit is contained in:
Tilo Spannagel 2018-03-13 10:58:19 +01:00
parent cf450e5d14
commit d104e1cba0
No known key found for this signature in database
GPG key ID: B89F1626A58E1429
5 changed files with 112 additions and 59 deletions

View file

@ -16,12 +16,12 @@ dockerfileCommit() {
(
cd "$dir";
fileCommit Dockerfile \
$(git show HEAD:./Dockerfile | awk '
$(awk '
toupper($1) == "COPY" {
for (i = 2; i < NF; i++)
print $i;
}
')
' Dockerfile)
)
}
@ -57,8 +57,14 @@ join() {
}
latest=$( curl -fsSL 'https://download.nextcloud.com/server/releases/' |tac|tac| \
grep -oE 'nextcloud-[[:digit:]]+(.[[:digit:]]+)+' | \
grep -oE '[[:digit:]]+(.[[:digit:]]+)+' | \
grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}' | \
grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}' | \
sort -uV | \
tail -1 )
latest_rc=$( curl -fsSL 'https://download.nextcloud.com/server/prereleases/' |tac|tac| \
grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}RC[[:digit:]]+' | \
grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}RC[[:digit:]]+' | \
sort -uV | \
tail -1 )
@ -72,12 +78,23 @@ for version in "${versions[@]}"; do
done) )
for variant in "${variants[@]}"; do
commit="$(dockerfileCommit "$version/$variant")"
fullversion="$(git show "$commit":"$version/$variant/Dockerfile" | awk '$1 == "ENV" && $2 == "NEXTCLOUD_VERSION" { print $3; exit }')"
fullversion_with_extension="$( awk '$1 == "ENV" && $2 == "NEXTCLOUD_VERSION" { print $3; exit }' "$version/$variant/Dockerfile" )"
fullversion="$( echo "$fullversion_with_extension" | grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}')"
versionAliases=( "$fullversion" "${fullversion%.*}" "${fullversion%.*.*}" )
if [ "$fullversion" = "$latest" ]; then
versionAliases=( )
versionPostfix=""
if [ "$fullversion_with_extension" != "$fullversion" ]; then
versionAliases=( "$fullversion_with_extension" )
versionPostfix="-rc"
fi
versionAliases+=( "$fullversion$versionPostfix" "${fullversion%.*}$versionPostfix" "${fullversion%.*.*}$versionPostfix" )
if [ "$fullversion_with_extension" = "$latest" ]; then
versionAliases+=( "latest" )
fi
if [ "$fullversion_with_extension" = "$latest_rc" ]; then
versionAliases+=( "rc" )
fi
variantAliases=( "${versionAliases[@]/%/-$variant}" )
variantAliases=( "${variantAliases[@]//latest-}" )