Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

build: Ensure correct go-bindata is used #1520

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 14 additions & 14 deletions scripts/update-bindata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ set -o pipefail

ROOT_DIR="$(cd "$(dirname "$0")/.." ; pwd)"

if command -v go-bindata > /dev/null; then
cd "${ROOT_DIR}"
"go-bindata" \
-nocompress \
-nometadata \
-pkg 'common' \
-o test/common/bindata.go \
test/common/fixtures \
config/kubefedconfig.yaml \
config/enabletypedirectives

cat ./hack/boilerplate.go.txt ./test/common/bindata.go > bindatatmp \
&& mv bindatatmp ./test/common/bindata.go
else
cd "${ROOT_DIR}"

if [ ! -x "${ROOT_DIR}"/bin/go-bindata ]; then
echo "go-bindata is not found. Use './scripts/download-binaries.sh' to download it."
exit 1
fi

"${ROOT_DIR}"/bin/go-bindata \
-nocompress \
-nometadata \
-pkg 'common' \
-o test/common/bindata.go \
test/common/fixtures \
config/kubefedconfig.yaml \
config/enabletypedirectives

cat ./hack/boilerplate.go.txt ./test/common/bindata.go > bindatatmp \
&& mv bindatatmp ./test/common/bindata.go