0dd13ecb |
#!/bin/bash
|
e3bb13a1 |
set -o errexit
set -o nounset
set -o pipefail |
0dd13ecb |
|
e3bb13a1 |
OS_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${OS_ROOT}/hack/common.sh"
# Go to the top of the tree.
cd "${OS_ROOT}" |
8fd4257f |
|
0dd13ecb |
# If we are running inside of Travis then do not run the rest of this
# script unless we want to TEST_ASSETS |
e3bb13a1 |
if [[ "${TRAVIS-}" == "true" && "${TEST_ASSETS-}" == "false" ]]; then |
0dd13ecb |
exit
fi
|
e3bb13a1 |
pushd "${OS_ROOT}/assets" > /dev/null |
94cb4fe4 |
grunt test
grunt build |
8fd4257f |
popd > /dev/null
|
e3bb13a1 |
pushd "${OS_ROOT}" > /dev/null |
7edc7f74 |
Godeps/_workspace/bin/go-bindata -nocompress -prefix "assets/dist" -pkg "assets" -o "_output/test/assets/bindata.go" -ignore "\\.gitignore" assets/dist/... |
8fd4257f |
echo "Validating checked in bindata.go is up to date..." |
d0ea5c3c |
if ! assetdiff=$(diff -u _output/test/assets/bindata.go pkg/assets/bindata.go) ; then |
f6226820 |
echo "$assetdiff" | head -c 1000 |
7e004cf0 |
|
e3bb13a1 |
pushd "${OS_ROOT}/assets" > /dev/null |
7e004cf0 |
|
e3bb13a1 |
if [[ "${TRAVIS-}" == "true" ]]; then |
143276f6 |
echo ""
echo "Bower versions..."
bower list -o |
7e004cf0 |
|
143276f6 |
echo ""
echo "NPM versions..."
npm list
fi |
7e004cf0 |
popd > /dev/null
|
d41c7d2d |
exit 1 |
7e004cf0 |
fi |
d0ea5c3c |
popd > /dev/null |