2015-09-15 19:38:54 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# List of bundles to create when no argument is passed
|
|
|
|
DEFAULT_BUNDLES=(
|
|
|
|
validate-gofmt
|
2015-09-27 13:56:53 +00:00
|
|
|
validate-govet
|
2015-10-30 07:55:08 +00:00
|
|
|
generate
|
2015-09-15 19:38:54 +00:00
|
|
|
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
|