File tree Expand file tree Collapse file tree 3 files changed +40
-3
lines changed
Expand file tree Collapse file tree 3 files changed +40
-3
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,34 @@ concat(
88 "body.html" ,
99 "footer.html" ,
1010 ],
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+ }),
1116)
1217
1318# This target is used by the shell rule.
1419sh_binary (
15- name = "merge " ,
20+ name = "merge_on_linux " ,
1621 srcs = ["merge.sh" ],
1722)
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):
1818 outputs = [ctx .outputs .out ],
1919 arguments = args ,
2020 progress_message = "Merging into %s" % ctx .outputs .out .short_path ,
21- executable = ctx .executable ._merge_tool ,
21+ executable = ctx .executable .merge_tool ,
2222 )
2323
2424concat = rule (
2525 implementation = _impl ,
2626 attrs = {
2727 "chunks" : attr .label_list (allow_files = True ),
2828 "out" : attr .output (mandatory = True ),
29- "_merge_tool " : attr .label (
29+ "merge_tool " : attr .label (
3030 executable = True ,
3131 cfg = "host" ,
3232 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