| 
									
										
										
										
											2016-06-02 13:39:03 +02:00
										 |  |  | import "typings-global"; | 
					
						
							|  |  |  | import * as plugins from "./npmci.plugins"; | 
					
						
							|  |  |  | import {bash} from "./npmci.bash"; | 
					
						
							| 
									
										
										
										
											2016-06-03 02:56:20 +02:00
										 |  |  | import * as env from "./npmci.env"; | 
					
						
							| 
									
										
										
										
											2016-06-02 13:39:03 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | export let build = function(commandArg){ | 
					
						
							| 
									
										
										
										
											2016-06-03 02:10:34 +02:00
										 |  |  |     switch(commandArg){ | 
					
						
							|  |  |  |         case "docker": | 
					
						
							| 
									
										
										
										
											2016-06-03 03:44:24 +02:00
										 |  |  |             return docker();    | 
					
						
							| 
									
										
										
										
											2016-06-03 02:10:34 +02:00
										 |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | let docker = function(){ | 
					
						
							|  |  |  |     let done = plugins.q.defer(); | 
					
						
							| 
									
										
										
										
											2016-06-03 03:44:24 +02:00
										 |  |  |     plugins.shelljs.exec("docker build -t " + env.dockerTag()); | 
					
						
							| 
									
										
										
										
											2016-06-03 02:10:34 +02:00
										 |  |  |     done.resolve(); | 
					
						
							|  |  |  |     return done.promise; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 |