2015-09-15 19:38:54 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
2019-08-11 10:20:53 +00:00
|
|
|
export GO111MODULE=on
|
|
|
|
export GOPROXY=https://proxy.golang.org
|
|
|
|
|
2015-09-15 19:38:54 +00:00
|
|
|
# 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
|
2022-09-14 13:10:08 +00:00
|
|
|
echo "---> Making bundle: $(basename "${bundle}") (in $SCRIPT_DIR)"
|
2019-05-10 15:24:06 +00:00
|
|
|
# shellcheck source=/dev/null
|
2022-09-14 13:10:08 +00:00
|
|
|
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
|
2022-09-14 13:10:08 +00:00
|
|
|
# shellcheck disable=SC2048
|
2019-05-10 15:24:06 +00:00
|
|
|
for bundle in ${bundles[*]}; do
|
2022-09-14 13:10:08 +00:00
|
|
|
bundle "${bundle}"
|
2015-09-15 19:38:54 +00:00
|
|
|
echo
|
|
|
|
done
|