netbox-docker/build-branches.sh

19 lines
487 B
Bash
Raw Normal View History

#!/bin/bash
# Builds develop, develop-* and master branches
ORIGINAL_GITHUB_REPO="digitalocean/netbox"
GITHUB_REPO="${GITHUB_REPO-$ORIGINAL_GITHUB_REPO}"
URL_RELEASES="https://api.github.com/repos/${GITHUB_REPO}/branches"
2018-03-05 14:29:24 +01:00
CURL="curl -sS"
BRANCHES=$($CURL "${URL_RELEASES}" | jq -r 'map(.name) | .[] | scan("^[^v].+") | match("^(master|develop).*") | .string')
2018-04-06 11:15:39 +02:00
ERROR=0
for BRANCH in $BRANCHES; do
2018-03-05 14:29:24 +01:00
# shellcheck disable=SC2068
2018-04-06 11:15:39 +02:00
./build.sh "${BRANCH}" $@ || ERROR=1
done
2018-04-06 11:15:39 +02:00
exit $ERROR