| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-02 00:22:24 -08:00
										 |  |  | set -u -e -o pipefail | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Setup environment | 
					
						
							| 
									
										
										
										
											2017-03-05 01:49:10 -08:00
										 |  |  | readonly thisDir=$(cd $(dirname $0); pwd) | 
					
						
							|  |  |  | source ${thisDir}/_travis-fold.sh | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # If the previous commands in the `script` section of .travis.yaml failed, then abort. | 
					
						
							|  |  |  | # The variable is not set in early stages of the build, so we default to 0 there. | 
					
						
							|  |  |  | # https://docs.travis-ci.com/user/environment-variables/ | 
					
						
							|  |  |  | if [[ ${TRAVIS_TEST_RESULT=0} == 1 ]]; then | 
					
						
							|  |  |  |   exit 1; | 
					
						
							|  |  |  | fi | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-09 19:08:16 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-02 00:22:24 -08:00
										 |  |  | travisFoldStart "tsc tools" | 
					
						
							|  |  |  |   $(npm bin)/tsc -p tools | 
					
						
							|  |  |  |   cp tools/@angular/tsc-wrapped/package.json dist/tools/@angular/tsc-wrapped | 
					
						
							|  |  |  | travisFoldEnd "tsc tools" | 
					
						
							| 
									
										
										
										
											2017-02-09 19:08:16 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-02 00:22:24 -08:00
										 |  |  | travisFoldStart "tsc all" | 
					
						
							| 
									
										
										
										
											2017-03-07 11:04:30 -08:00
										 |  |  |   node --max-old-space-size=3000 dist/tools/@angular/tsc-wrapped/src/main -p packages | 
					
						
							| 
									
										
										
										
											2017-03-08 15:53:45 -08:00
										 |  |  |   node --max-old-space-size=3000 dist/tools/@angular/tsc-wrapped/src/main -p modules | 
					
						
							| 
									
										
										
										
											2017-03-02 00:22:24 -08:00
										 |  |  | travisFoldEnd "tsc all" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-25 19:39:01 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-02 00:22:24 -08:00
										 |  |  | # TODO(i): what are these compilations here for? | 
					
						
							|  |  |  | travisFoldStart "tsc a bunch of useless stuff" | 
					
						
							| 
									
										
										
										
											2017-03-07 11:04:30 -08:00
										 |  |  |   node dist/tools/@angular/tsc-wrapped/src/main -p packages/core/tsconfig-build.json | 
					
						
							|  |  |  |   node dist/tools/@angular/tsc-wrapped/src/main -p packages/common/tsconfig-build.json | 
					
						
							|  |  |  |   node dist/tools/@angular/tsc-wrapped/src/main -p packages/platform-browser/tsconfig-build.json | 
					
						
							|  |  |  |   node dist/tools/@angular/tsc-wrapped/src/main -p packages/router/tsconfig-build.json | 
					
						
							|  |  |  |   node dist/tools/@angular/tsc-wrapped/src/main -p packages/forms/tsconfig-build.json | 
					
						
							| 
									
										
										
										
											2017-03-02 00:22:24 -08:00
										 |  |  | travisFoldEnd "tsc a bunch of useless stuff" | 
					
						
							| 
									
										
										
										
											2017-01-25 19:39:01 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-02 00:22:24 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Build angular.io | 
					
						
							| 
									
										
										
										
											2017-03-08 14:48:20 -08:00
										 |  |  | if [[ ${CI_MODE:-} == "aio" ]]; then | 
					
						
							| 
									
										
										
										
											2017-03-02 00:22:24 -08:00
										 |  |  |   travisFoldStart "build.aio" | 
					
						
							| 
									
										
										
										
											2017-05-12 22:07:51 +03:00
										 |  |  |   ( | 
					
						
							| 
									
										
										
										
											2017-03-02 00:22:24 -08:00
										 |  |  |     cd "`dirname $0`/../../aio" | 
					
						
							| 
									
										
										
										
											2017-05-12 01:12:23 +03:00
										 |  |  |     yarn build | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # If this is a PR for angular/angular@master, deploy a snapshot for previewing early | 
					
						
							|  |  |  |     # (if preconditions are met) regardless of the test outcome. | 
					
						
							|  |  |  |     if [[ ${TRAVIS_REPO_SLUG} == "angular/angular" ]] && | 
					
						
							|  |  |  |        [[ ${TRAVIS_BRANCH} == "master" ]] && | 
					
						
							|  |  |  |        [[ $TRAVIS_PULL_REQUEST != "false" ]]; then | 
					
						
							|  |  |  |       travisFoldStart "deploy.aio.pr-preview" | 
					
						
							|  |  |  |         yarn deploy-preview -- --skip-build | 
					
						
							|  |  |  |       travisFoldEnd "deploy.aio.pr-preview" | 
					
						
							|  |  |  |     fi | 
					
						
							| 
									
										
										
										
											2017-05-12 22:07:51 +03:00
										 |  |  |   ) | 
					
						
							| 
									
										
										
										
											2017-03-02 00:22:24 -08:00
										 |  |  |   travisFoldEnd "build.aio" | 
					
						
							|  |  |  | fi |