Build pre-released versions

... instead of development branches.
This commit is contained in:
Christian Mäder 2017-10-02 11:08:50 +02:00
parent 360cb0e90f
commit 33b1475840
No known key found for this signature in database
GPG key ID: 92FFD0A711F196BB
2 changed files with 8 additions and 5 deletions

View file

@ -1,7 +1,10 @@
#!/bin/bash
URL_LATEST=https://api.github.com/repos/digitalocean/netbox/releases/latest
URL_LATEST=https://api.github.com/repos/digitalocean/netbox/releases
VERSION=$(curl "${URL_LATEST}" | jq -r ".tag_name")
JQ_LATEST="group_by(.prerelease) | .[] | sort_by(.published_at) | reverse | .[0] | select(.prerelease==${PRERELEASE-false}) | .tag_name"
VERSION=$(curl "${URL_LATEST}" | jq -r "${JQ_LATEST}")
./build.sh "${VERSION}" $@
./build.sh "${VERSION}" --push