File tree 3 files changed +40
-3
lines changed
3 files changed +40
-3
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,34 @@ concat(
8
8
"body.html" ,
9
9
"footer.html" ,
10
10
],
11
+ merge_tool = select ({
12
+ "//conditions:default" : "//actions_run:merge_on_linux" ,
13
+ "on_linux" : "//actions_run:merge_on_linux" ,
14
+ "on_windows" : "//actions_run:merge_on_windows.bat" ,
15
+ }),
11
16
)
12
17
13
18
# This target is used by the shell rule.
14
19
sh_binary (
15
- name = "merge " ,
20
+ name = "merge_on_linux " ,
16
21
srcs = ["merge.sh" ],
17
22
)
23
+
24
+ sh_binary (
25
+ name = "merge_on_windows.bat" ,
26
+ srcs = ["merge.bat" ],
27
+ )
28
+
29
+ config_setting (
30
+ name = "on_linux" ,
31
+ constraint_values = [
32
+ "@platforms//os:linux"
33
+ ],
34
+ )
35
+
36
+ config_setting (
37
+ name = "on_windows" ,
38
+ constraint_values = [
39
+ "@platforms//os:windows"
40
+ ],
41
+ )
Original file line number Diff line number Diff line change @@ -18,15 +18,15 @@ def _impl(ctx):
18
18
outputs = [ctx .outputs .out ],
19
19
arguments = args ,
20
20
progress_message = "Merging into %s" % ctx .outputs .out .short_path ,
21
- executable = ctx .executable ._merge_tool ,
21
+ executable = ctx .executable .merge_tool ,
22
22
)
23
23
24
24
concat = rule (
25
25
implementation = _impl ,
26
26
attrs = {
27
27
"chunks" : attr .label_list (allow_files = True ),
28
28
"out" : attr .output (mandatory = True ),
29
- "_merge_tool " : attr .label (
29
+ "merge_tool " : attr .label (
30
30
executable = True ,
31
31
cfg = "host" ,
32
32
allow_files = True ,
Original file line number Diff line number Diff line change
1
+ @ echo OFF
2
+ set files =
3
+
4
+ set out = %1
5
+
6
+ :addparam
7
+ shift
8
+ if " %1 " == " " goto paramscomplete
9
+ set files = %files% %1
10
+ goto addparam
11
+ :paramscomplete
12
+
13
+ type %files:/ =\ % > %out:/ =\ %
You can’t perform that action at this time.
0 commit comments