Prevent the building of the default variant for each Travis stage

This commit is contained in:
Laurent Goderre 2018-04-03 15:11:56 -04:00
parent 7823eba96f
commit f385ece941
1 changed files with 4 additions and 2 deletions

View File

@ -49,12 +49,14 @@ for version in "${versions[@]}"; do
tag=$(get_tag "$version")
full_version=$(get_full_version "$version")
build "$version" "" "$tag"
# Get supported variants according to the target architecture.
# See details in function.sh
IFS=' ' read -ra variants <<< "$(IFS=','; get_variants "$(dirname "$version")" "$2")"
if [[ "${variants[*]}" =~ "default" ]]; then
build "$version" "" "$tag"
fi
for variant in "${variants[@]}"; do
# Skip non-docker directories
[ -f "$version/$variant/Dockerfile" ] || continue