Repository navigation
Expand file tree
/
Copy pathBUCK
More file actions
59 lines (55 loc) · 2.07 KB
/
Copy pathBUCK
File metadata and controls
59 lines (55 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
load("@fbcode_macros//build_defs:native_rules.bzl", "buck_genrule")
load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary")
load("@fbsource//xplat/third-party/yarn:yarn_offline_mirror_helper.bzl", "yarn_offline_mirror_path")
oncall("scm_client_infra")
buck_genrule(
name = "isl-sources",
srcs = glob(
["isl/**", "isl-server/**", "shared/**", "components/**"],
exclude = ["**/node_modules/**", "isl/build/**", "isl-server/dist/**"],
)
+ ["LICENSE", "package.json", "prettier.config.cjs", "vscode/webview/state.tsx"],
out = "isl-sources",
cmd = 'mkdir -p "$OUT" && cp -RL "$SRCDIR/." "$OUT/"',
visibility = ["PUBLIC"],
)
python_binary(
name = "build-tar-script",
main_function = ".build-tar.main",
main_src = "build-tar.py",
)
buck_genrule(
name = "isl-tar",
# While it may be tedious to maintain the list of srcs by hand, it ensures
# that changes in the addons/ folder that are not part of ISL do not trigger
# a rebuild.
srcs = glob(
[
"eslint-rules/**",
"isl/**",
"isl-server/**",
"shared/**",
"components/**",
],
exclude = [
"**/node_modules/**",
"isl/build/**",
"isl-server/dist/**",
],
)
+ [
".gitignore",
".oxlintrc.json",
"package.json",
"prettier.config.cjs",
"vscode/webview/state.tsx",
"yarn.lock",
],
out = "isl-dist.tar.xz",
cmd = '$(exe :build-tar-script) --yarn "$(exe fbsource//xplat/third-party/yarn:yarn)" --yarn-offline-mirror "{yarn_offline_mirror}" -o "$OUT" --src "$SRCDIR" --tmp "$TMP"'.format(
yarn_offline_mirror = yarn_offline_mirror_path()
),
cmd_exe = '$(exe :build-tar-script) --node "$(location fbsource//xplat/third-party/node:windows)" --yarn "$(location fbsource//xplat/third-party/yarn:yarn-internal)\\src\\index.js" --yarn-offline-mirror "{yarn_offline_mirror}" -o "$OUT" --src "$SRCDIR" --tmp "$TMP"'.format(
yarn_offline_mirror = yarn_offline_mirror_path()
),
)