From d365e45c022bcd901a9770b18b48c2aa29e4cc4c Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Tue, 6 Jun 2017 15:24:08 +0200 Subject: [PATCH] Use the downloads index to get the latest version --- generate-stackbrew-library.sh | 10 +++++----- update.sh | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 236a3900..9ede46c9 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -40,11 +40,11 @@ join() { echo "${out#$sep}" } -latest=$(curl -fsSL 'https://nextcloud.com/changelog/' |tac|tac \ - | grep -o "\(Version\|Release\)\s\+[[:digit:]]\+\(.[[:digit:]]\+\)\+" \ - | awk '{ print $2 }' \ - | sort -uV \ - | tail -1) +latest=$( curl -fsSL 'https://download.nextcloud.com/server/releases/' |tac|tac| \ + grep -oE 'nextcloud-[[:digit:]]+(.[[:digit:]]+)+' | \ + grep -oE '[[:digit:]]+(.[[:digit:]]+)+' | \ + sort -uV | \ + tail -1 ) # Generate each of the tags. versions=( */ ) diff --git a/update.sh b/update.sh index b8afc6ad..4d3a54e1 100755 --- a/update.sh +++ b/update.sh @@ -11,10 +11,10 @@ function version_greater_or_equal() { [[ "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" || "$1" == "$2" ]]; } -latests=( $(curl -sSL 'https://download.nextcloud.com/server/releases/' |tac|tac| \ - grep -oE '>nextcloud-[[:digit:]]+(.[[:digit:]]+)+\.tar\.bz2<' | \ +latests=( $( curl -fsSL 'https://download.nextcloud.com/server/releases/' |tac|tac| \ + grep -oE 'nextcloud-[[:digit:]]+(.[[:digit:]]+)+' | \ grep -oE '[[:digit:]]+(.[[:digit:]]+)+' | \ - sort -V ) ) + sort -uV ) ) travisEnv= for latest in "${latests[@]}"; do