forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupdate-generated-bindata.sh
executable file
·60 lines (52 loc) · 1.8 KB
/
update-generated-bindata.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
STARTTIME=$(date +%s)
source "$(dirname "${BASH_SOURCE}")/lib/init.sh"
os::build::setup_env
EXAMPLES=examples
OUTPUT_PARENT=${OUTPUT_ROOT:-$OS_ROOT}
pushd vendor/github.com/jteeuwen/go-bindata > /dev/null
go install ./...
popd > /dev/null
os::util::ensure::gopath_binary_exists 'go-bindata'
pushd "${OS_ROOT}" > /dev/null
"$(os::util::find::gopath_binary go-bindata)" \
-nocompress \
-nometadata \
-prefix "bootstrap" \
-pkg "bootstrap" \
-o "${OUTPUT_PARENT}/pkg/bootstrap/bindata.go" \
-ignore "README.md" \
-ignore ".*\.go$" \
-ignore "\.DS_Store" \
-ignore application-template.json \
${EXAMPLES}/image-streams/... \
${EXAMPLES}/db-templates/... \
${EXAMPLES}/jenkins \
${EXAMPLES}/jenkins/pipeline \
${EXAMPLES}/quickstarts/... \
${EXAMPLES}/logging/... \
${EXAMPLES}/heapster/... \
${EXAMPLES}/prometheus/... \
pkg/image/admission/imagepolicy/api/v1/...
"$(os::util::find::gopath_binary go-bindata)" \
-nocompress \
-nometadata \
-prefix "testextended" \
-pkg "testdata" \
-o "${OUTPUT_PARENT}/test/extended/testdata/bindata.go" \
-ignore "\.DS_Store" \
-ignore ".*\.(go|md)$" \
test/extended/testdata/... \
test/integration/testdata \
examples/db-templates \
examples/image-streams \
examples/sample-app \
examples/hello-openshift \
examples/jenkins/...
popd > /dev/null
# If you hit this, please reduce other tests instead of importing more
if [[ "$( cat "${OUTPUT_PARENT}/test/extended/testdata/bindata.go" | wc -c )" -gt 700000 ]]; then
echo "error: extended bindata is $( cat "${OUTPUT_PARENT}/test/extended/testdata/bindata.go" | wc -c ) bytes, reduce the size of the import" 1>&2
exit 1
fi
ret=$?; ENDTIME=$(date +%s); echo "$0 took $(($ENDTIME - $STARTTIME)) seconds"; exit "$ret"