File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
devtools/projects/shell-browser/src Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ load("//devtools/tools:ng_module.bzl", "ng_module")
4
4
load ("//devtools/tools:typescript.bzl" , "ts_library" )
5
5
load ("//tools:defaults.bzl" , "esbuild" )
6
6
load ("//devtools/tools/esbuild:index.bzl" , "LINKER_PROCESSED_FW_PACKAGES" )
7
+ load ("@bazel_skylib//rules:common_settings.bzl" , "string_flag" )
7
8
8
9
package (default_visibility = ["//visibility:public" ])
9
10
@@ -292,14 +293,23 @@ filegroup(
292
293
],
293
294
)
294
295
296
+ string_flag (
297
+ name = "flag_browser" ,
298
+ build_setting_default = "chrome" ,
299
+ values = [
300
+ "chrome" ,
301
+ "firefox" ,
302
+ ],
303
+ )
304
+
295
305
config_setting (
296
306
name = "browser_chrome" ,
297
- values = {"define " : "browser= chrome" },
307
+ flag_values = {":flag_browser " : "chrome" },
298
308
)
299
309
300
310
config_setting (
301
311
name = "browser_firefox" ,
302
- values = {"define " : "browser= firefox" },
312
+ flag_values = {":flag_browser " : "firefox" },
303
313
)
304
314
305
315
genrule (
Original file line number Diff line number Diff line change 37
37
"ts-circular-deps:approve" : " yarn -s ng-dev ts-circular-deps approve --config ./packages/circular-deps-test.conf.js" ,
38
38
"check-tooling-setup" : " yarn tsc --project .ng-dev/tsconfig.json" ,
39
39
"devtools:devserver" : " ibazel run //devtools/src:devserver" ,
40
- "devtools:build:chrome" : " bazelisk build --config snapshot //devtools/projects/shell-browser/src:prodapp --define browser=chrome " ,
41
- "devtools:build:firefox" : " bazelisk build --config snapshot //devtools/projects/shell-browser/src:prodapp --define browser=firefox " ,
42
- "devtools:test" : " bazelisk test --config snapshot //devtools/... --define browser=chrome"
40
+ "devtools:build:chrome" : " bazelisk build --config snapshot -- //devtools/projects/shell-browser/src:flag_browser=chrome -- devtools/projects/shell- browser/src:prodapp " ,
41
+ "devtools:build:firefox" : " bazelisk build --config snapshot -- //devtools/projects/shell-browser/src:flag_browser=firefox -- devtools/projects/shell- browser/src:prodapp " ,
42
+ "devtools:test" : " bazelisk test --config snapshot -- //devtools/projects/shell- browser/src:flag_browser =chrome -- //devtools/... "
43
43
},
44
44
"// 1" : " dependencies are used locally and by bazel" ,
45
45
"dependencies" : {
You can’t perform that action at this time.
0 commit comments