traefik/script/make.sh
Vincent Demeester 0ea80582d2 Update building stuff
- Add a Makefile with common targets (binary, test, validate, ..)
- Use docker to build it (isolated)

And update circleci to work with the new Makefile..

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-15 23:09:48 +02:00

30 lines
505 B
Bash
Executable file

#!/usr/bin/env bash
set -e
# List of bundles to create when no argument is passed
DEFAULT_BUNDLES=(
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