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

@ -21,8 +21,8 @@ after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
./build.sh master --push;
./build.sh develop-2.2 --push;
./build-latest.sh;
./build-latest.sh --push;
PRERELEASE=true ./build-latest.sh --push;
fi
notifications:

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