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