Skip to content

Commit

Permalink
Use the downloads index to get the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
tilosp committed Jun 6, 2017
1 parent aa40fa7 commit d365e45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=( */ )
Expand Down
6 changes: 3 additions & 3 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d365e45

Please sign in to comment.