diff options
author | Tilo Spannagel <development@tilosp.de> | 2019-03-12 13:47:17 +0100 |
---|---|---|
committer | Tilo Spannagel <development@tilosp.de> | 2019-03-12 14:17:26 +0100 |
commit | b7e9458648f6d8571ff0e3fcf6abf8aadb9dab35 (patch) | |
tree | 0590d3530ceea6c8edb926fce8de789e34bef0c7 | |
parent | c98481a3887930df88ffbfa96579361757ba6988 (diff) |
Add image for alpha
Signed-off-by: Tilo Spannagel <development@tilosp.de>
-rwxr-xr-x | generate-stackbrew-library.sh | 20 | ||||
-rwxr-xr-x | update.sh | 25 |
2 files changed, 26 insertions, 19 deletions
diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index c36ea33b..847c7ac8 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -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 @@ -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 |