Add image for alpha
Signed-off-by: Tilo Spannagel <development@tilosp.de>
This commit is contained in:
parent
c98481a388
commit
b7e9458648
@ -73,18 +73,6 @@ latest=$( curl -fsSL 'https://download.nextcloud.com/server/releases/' |tac|tac|
|
||||
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 )
|
||||
|
||||
latest_beta=$( curl -fsSL 'https://download.nextcloud.com/server/prereleases/' |tac|tac| \
|
||||
grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}beta[[:digit:]]+' | \
|
||||
grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}beta[[:digit:]]+' | \
|
||||
sort -uV | \
|
||||
tail -1 )
|
||||
|
||||
# Generate each of the tags.
|
||||
versions=( */ )
|
||||
versions=( "${versions[@]%/}" )
|
||||
@ -102,19 +90,13 @@ for version in "${versions[@]}"; do
|
||||
versionPostfix=""
|
||||
if [ "$fullversion_with_extension" != "$fullversion" ]; then
|
||||
versionAliases=( "$fullversion_with_extension" )
|
||||
versionPostfix="-$( echo "$fullversion_with_extension" | tr '[:upper:]' '[:lower:]' | grep -oE '(beta|rc)')"
|
||||
versionPostfix="-$( echo "$fullversion_with_extension" | tr '[:upper:]' '[:lower:]' | grep -oE '(beta|rc|alpha)')"
|
||||
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
|
||||
if [ "$fullversion_with_extension" = "$latest_beta" ]; then
|
||||
versionAliases+=( "beta" )
|
||||
fi
|
||||
|
||||
for channel in "${!release_channel[@]}"; do
|
||||
if [ "$fullversion_with_extension" = "${release_channel[$channel]}" ]; then
|
||||
|
25
update.sh
25
update.sh
@ -55,6 +55,11 @@ function check_rc_released() {
|
||||
printf '%s\n' "${fullversions_rc[@]}" | grep -qE "^$( echo "$1" | grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}' )"
|
||||
}
|
||||
|
||||
# checks if the the alpha has already a beta
|
||||
function check_beta_released() {
|
||||
printf '%s\n' "${fullversions_beta[@]}" | grep -qE "^$( echo "$1" | grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}' )"
|
||||
}
|
||||
|
||||
travisEnv=
|
||||
|
||||
function create_variant() {
|
||||
@ -170,6 +175,26 @@ for version in "${versions_beta[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
fullversions_alpha=( $( curl -fsSL 'https://download.nextcloud.com/server/prereleases/' |tac|tac| \
|
||||
grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}alpha[[:digit:]]+' | \
|
||||
grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}alpha[[:digit:]]+' | \
|
||||
sort -urV ) )
|
||||
versions_alpha=( $( printf '%s\n' "${fullversions_alpha[@]}" | cut -d. -f1-2 | sort -urV ) )
|
||||
for version in "${versions_alpha[@]}"; do
|
||||
fullversion="$( printf '%s\n' "${fullversions_alpha[@]}" | grep -E "^$version" | head -1 )"
|
||||
|
||||
if version_greater_or_equal "$version" "$min_version"; then
|
||||
|
||||
if ! check_beta_released "$fullversion"; then
|
||||
|
||||
for variant in "${variants[@]}"; do
|
||||
|
||||
create_variant "$version-alpha" "https:\/\/download.nextcloud.com\/server\/prereleases"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# remove everything after '- stage: test images'
|
||||
travis="$(awk '!p; /- stage: test images/ {p=1}' .travis.yml)"
|
||||
echo "$travis" > .travis.yml
|
||||
|
Loading…
Reference in New Issue
Block a user