ui/scripts/ci

38 lines
666 B
Bash
Executable File

#!/bin/bash
set -e
BUILD_DEBUG="${BUILD_DEBUG:-}"
if [[ -n "${BUILD_DEBUG}" ]]; then
set -x
env
fi
# cd to app root
CWD=$(dirname $0)
if [[ `basename $(pwd)` = 'scripts' ]]; then
cd ../
else
cd `dirname $CWD`
fi
if [[ "${ENABLE_DOCKER}" == "true" ]]; then
wrapdocker
fi
if [[ "${UPLOAD_LATEST}" == "true" ]]; then
docker pull google/cloud-sdk
fi
rm -rf node_modules build dist tmp
./scripts/bootstrap
./node_modules/.bin/eslint --max-warnings 0 .
if [[ "${UPLOAD_LATEST}" == "true" ]] && [[ "${ENABLE_DOCKER}" == "true" ]]; then
./scripts/build-static -l -u -v latest2
# (build-static contains a call to test & build)
else
yarn test
fi