⚙️ Compact Variants Logic into build-all.sh

This commit is contained in:
Christian Mäder 2018-03-05 14:36:24 +01:00
parent e3120a715e
commit 36f79b3ffe
No known key found for this signature in database
GPG key ID: 92FFD0A711F196BB
4 changed files with 61 additions and 16 deletions

View file

@ -46,14 +46,9 @@ URL_DOCKERHUB_TAG="https://registry.hub.docker.com/v2/${DOCKERHUB_REPO}/tags/lis
AUTHORIZATION_HEADER="Authorization: Bearer ${BEARER_TOKEN}"
ALREADY_BUILT="$($CURL -H "${AUTHORIZATION_HEADER}" "${URL_DOCKERHUB_TAG}" | jq -e ".tags | any(.==\"${VERSION}\")")"
VARIANTS=( "ldap" )
if [ "$ALREADY_BUILT" == "false" ]; then
# shellcheck disable=SC2068
./build.sh "${VERSION}" $@
for var in "${VARIANTS[@]}" ; do
VARIANT=$var ./build.sh "${VERSION}" $@
done
else
echo "${VERSION} already exists on https://hub.docker.com/r/${DOCKERHUB_REPO}"
fi