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=(
|
2015-10-30 07:55:08 +00:00
|
|
|
generate
|
2019-03-04 15:40:05 +00:00
|
|
|
validate-lint
|
2015-09-15 19:38:54 +00:00
|
|
|
binary
|
|
|
|
|
|
|
|
test-unit
|
|
|
|
test-integration
|
|
|
|
)
|
|
|
|
|
2019-05-10 15:24:06 +00:00
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${0}")" && pwd -P)"
|
|
|
|
|
2015-09-15 19:38:54 +00:00
|
|
|
bundle() {
|
|
|
|
local bundle="$1"; shift
|
2019-05-10 15:24:06 +00:00
|
|
|
echo "---> Making bundle: $(basename "$bundle") (in $SCRIPT_DIR)"
|
|
|
|
# shellcheck source=/dev/null
|
|
|
|
source "${SCRIPT_DIR}/$bundle"
|
2015-09-15 19:38:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if [ $# -lt 1 ]; then
|
2019-05-10 15:24:06 +00:00
|
|
|
bundles=${DEFAULT_BUNDLES[*]}
|
2015-09-15 19:38:54 +00:00
|
|
|
else
|
2019-05-10 15:24:06 +00:00
|
|
|
bundles=${*}
|
2015-09-15 19:38:54 +00:00
|
|
|
fi
|
2019-05-10 15:24:06 +00:00
|
|
|
for bundle in ${bundles[*]}; do
|
2015-09-15 19:38:54 +00:00
|
|
|
bundle "$bundle"
|
|
|
|
echo
|
|
|
|
done
|