build: No longer need to bazel build twice
This commit is contained in:
		
							parent
							
								
									7395a64668
								
							
						
					
					
						commit
						08ecfd891d
					
				| @ -15,28 +15,23 @@ jobs: | ||||
|           post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge" | ||||
|       - restore_cache: | ||||
|           key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }} | ||||
| 
 | ||||
|       - run: npm install | ||||
|       - run: npm run postinstall | ||||
|       - save_cache: | ||||
|           key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }} | ||||
|           paths: | ||||
|             - "node_modules" | ||||
|       - run: ./node_modules/.bin/gulp lint | ||||
| 
 | ||||
|   build: | ||||
|     <<: *defaults | ||||
|     steps: | ||||
|       - checkout | ||||
|       - restore_cache: | ||||
|           key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }} | ||||
|       - run: npm install | ||||
|       - run: npm run postinstall | ||||
| 
 | ||||
|       - run: bazel run @io_bazel_rules_typescript_node//:bin/npm install | ||||
|       - run: bazel build ... | ||||
|       - save_cache: | ||||
|           key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }} | ||||
|           paths: | ||||
|             - "node_modules" | ||||
|       # Build twice, workaround for | ||||
|       # https://github.com/bazelbuild/bazel/issues/3114 | ||||
|       - run: bazel build ... || bazel build ... | ||||
| 
 | ||||
| workflows: | ||||
|   version: 2 | ||||
|  | ||||
							
								
								
									
										11
									
								
								WORKSPACE
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								WORKSPACE
									
									
									
									
									
								
							| @ -1,12 +1,11 @@ | ||||
| load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") | ||||
| 
 | ||||
| git_repository( | ||||
|     name = "io_bazel_rules_typescript", | ||||
|     remote = "https://github.com/bazelbuild/rules_typescript.git", | ||||
|     commit = "804c5da", | ||||
|    name = "io_bazel_rules_typescript", | ||||
|    remote = "https://github.com/bazelbuild/rules_typescript.git", | ||||
|    commit = "3a8404d", | ||||
| ) | ||||
| 
 | ||||
| load("@io_bazel_rules_typescript//:defs.bzl", "node_repositories", "npm_install") | ||||
| load("@io_bazel_rules_typescript//:defs.bzl", "node_repositories") | ||||
| 
 | ||||
| node_repositories() | ||||
| npm_install(package_json = "//:package.json") | ||||
| node_repositories(package_json = "//:package.json") | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user