| 
									
										
										
										
											2015-03-02 09:43:56 -08:00
										 |  |  | #!/bin/bash
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Publishes Angular 2 packages to pub. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | set -ex | 
					
						
							|  |  |  | shopt -s extglob | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-18 16:07:35 -07:00
										 |  |  | DRY_RUN=false | 
					
						
							|  |  |  | if [[ $1 == '--dry_run' ]]; then | 
					
						
							|  |  |  |   DRY_RUN=true | 
					
						
							|  |  |  | fi; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-03-02 09:43:56 -08:00
										 |  |  | ROOT_DIR=$(cd $(dirname $0)/../..; pwd) | 
					
						
							|  |  |  | cd $ROOT_DIR | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | gulp clean | 
					
						
							|  |  |  | gulp build/packages.dart | 
					
						
							| 
									
										
										
										
											2015-04-13 18:34:34 -07:00
										 |  |  | gulp build/pubspec.dart | 
					
						
							| 
									
										
										
										
											2015-03-02 09:43:56 -08:00
										 |  |  | gulp build/analyze.dart | 
					
						
							| 
									
										
										
										
											2015-06-18 16:07:35 -07:00
										 |  |  | gulp build.dart.material | 
					
						
							| 
									
										
										
										
											2015-03-02 09:43:56 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | PKG_DIR=$ROOT_DIR/dist/pub | 
					
						
							|  |  |  | rm -fr $PKG_DIR | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | function publishModule { | 
					
						
							|  |  |  |   NAME=$1 | 
					
						
							|  |  |  |   PUBLISH_DIR=$PKG_DIR/$NAME | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-17 22:09:19 -08:00
										 |  |  |   scripts/publish/pub_prepare.sh $NAME | 
					
						
							| 
									
										
										
										
											2015-03-02 09:43:56 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-19 10:09:55 -07:00
										 |  |  |   if [[ "$DRY_RUN" == "false" ]]; then | 
					
						
							|  |  |  |     (cd $PUBLISH_DIR && pub publish -f) | 
					
						
							|  |  |  |   fi; | 
					
						
							| 
									
										
										
										
											2015-03-02 09:43:56 -08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | publishModule angular2 | 
					
						
							|  |  |  | publishModule benchpress | 
					
						
							| 
									
										
										
										
											2015-03-02 15:54:02 -08:00
										 |  |  | publishModule benchmarks | 
					
						
							| 
									
										
										
										
											2015-06-18 16:07:35 -07:00
										 |  |  | publishModule angular2_material | 
					
						
							| 
									
										
										
										
											2015-12-03 17:26:18 -08:00
										 |  |  | publishModule angular2_testing |