2018-01-30 04:45:53 -06:00
|
|
|
#!/bin/bash
|
2018-03-05 07:29:24 -06:00
|
|
|
# Builds all published branches
|
2018-01-30 04:45:53 -06:00
|
|
|
|
|
|
|
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 07:29:24 -06:00
|
|
|
CURL="curl -sS"
|
2018-01-30 04:45:53 -06:00
|
|
|
|
|
|
|
BRANCHES=$($CURL "${URL_RELEASES}" | jq -r 'map(.name) | .[] | scan("^[^v].+")')
|
|
|
|
|
|
|
|
for BRANCH in $BRANCHES; do
|
2018-03-05 07:29:24 -06:00
|
|
|
# shellcheck disable=SC2068
|
2018-01-30 04:45:53 -06:00
|
|
|
./build.sh "${BRANCH}" $@
|
2018-03-05 09:28:35 -06:00
|
|
|
exit $?
|
2018-01-30 04:45:53 -06:00
|
|
|
done
|