netbox-docker/build-latest.sh
Christian Mäder 33b1475840
Build pre-released versions
... instead of development branches.
2017-10-02 11:10:10 +02:00

11 lines
305 B
Bash
Executable File

#!/bin/bash
URL_LATEST=https://api.github.com/repos/digitalocean/netbox/releases
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}" $@