traefik/script/make.sh
Ludovic Fernandez fb617044e0 Update to Go1.12
Co-authored-by: juliens <julien@containo.us>
2019-03-01 11:48:04 +01:00

31 lines
515 B
Bash
Executable file

#!/usr/bin/env bash
set -e
# List of bundles to create when no argument is passed
DEFAULT_BUNDLES=(
generate
validate-gofmt
binary
test-unit
test-integration
)
bundle() {
local bundle="$1"; shift
echo "---> Making bundle: $(basename "$bundle") (in $DEST)"
source "script/$bundle" "$@"
}
if [ $# -lt 1 ]; then
bundles=(${DEFAULT_BUNDLES[@]})
else
bundles=($@)
fi
for bundle in ${bundles[@]}; do
export DEST=.
ABS_DEST="$(cd "$DEST" && pwd -P)"
bundle "$bundle"
echo
done