mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fb5520cebf
* build: move server rendering to dist * Verifying that Material works with `platform-server` now happens in the `dist/` folder (instead of the src/ folder) * Adds a gulp task to build the universal application. In the future serving the app will be also part of this * Address comments
54 lines
1.1 KiB
Bash
Executable File
54 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
echo ""
|
|
echo "Building sources and running tests. Running mode: ${MODE}"
|
|
echo ""
|
|
|
|
# Go to project dir
|
|
cd $(dirname $0)/../..
|
|
|
|
# Include sources.
|
|
source scripts/ci/sources/mode.sh
|
|
source scripts/ci/sources/tunnel.sh
|
|
|
|
# Get commit diff
|
|
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
|
fileDiff=$(git diff --name-only $TRAVIS_COMMIT_RANGE)
|
|
else
|
|
fileDiff=$(git diff --name-only $TRAVIS_BRANCH...HEAD)
|
|
fi
|
|
|
|
# Check if tests can be skipped
|
|
if [[ ${fileDiff} =~ ^(.*\.md\s*)*$ ]] && (is_e2e || is_unit); then
|
|
echo "Skipping e2e and unit tests since only markdown files changed"
|
|
exit 0
|
|
fi
|
|
|
|
start_tunnel
|
|
wait_for_tunnel
|
|
|
|
if is_lint; then
|
|
$(npm bin)/gulp ci:lint
|
|
elif is_e2e; then
|
|
$(npm bin)/gulp ci:e2e
|
|
elif is_aot; then
|
|
$(npm bin)/gulp ci:aot
|
|
elif is_payload; then
|
|
$(npm bin)/gulp ci:payload
|
|
elif is_closure_compiler; then
|
|
./scripts/closure-compiler/build-devapp-bundle.sh
|
|
elif is_unit; then
|
|
$(npm bin)/gulp ci:test
|
|
elif is_prerender; then
|
|
$(npm bin)/gulp ci:prerender
|
|
fi
|
|
|
|
# Upload coverage results if those are present.
|
|
if [ -f dist/coverage/coverage-summary.json ]; then
|
|
$(npm bin)/gulp ci:coverage
|
|
fi
|
|
|
|
teardown_tunnel
|