forked from bazelbuild/rules_closure
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprotobuf_javascript.patch
More file actions
113 lines (111 loc) · 3.07 KB
/
protobuf_javascript.patch
File metadata and controls
113 lines (111 loc) · 3.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
diff --git a/BUILD.bazel b/BUILD.bazel
index 62355ce..f989623 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -2,10 +2,6 @@
#
# See also code generation logic under generator/
-load("@rules_pkg//:mappings.bzl", "pkg_attributes", "pkg_files", "strip_prefix")
-load("@rules_pkg//:pkg.bzl", "pkg_tar", "pkg_zip")
-load("//:protobuf_javascript_release.bzl", "package_naming")
-
config_setting(
name = "x64_x86_windows",
values = {"cpu": "x64_x86_windows"},
@@ -31,65 +27,38 @@ config_setting(
values = {"cpu": "darwin_x86_64"},
)
-package_naming(
- name = "protobuf_javascript_pkg_naming",
- platform = select({
- ":k8": "linux-x86_64", # currently the only supported build type in Github Actions
- ":x64_x86_windows": "win32",
- ":x64_windows": "win64",
- ":darwin_arm64": "osx-aarch_64",
- ":darwin_x86_64": "osx-x86_64",
- "//conditions:default": "" # continues with current behavior when no --cpu is specified allowing existing internal builds to function
- })
-)
-
-pkg_files(
- name = "plugin_files",
- srcs = ["//generator:protoc-gen-js"],
- attributes = pkg_attributes(mode = "0555"),
- prefix = "bin/",
-)
-
-pkg_files(
- name = "dist_files",
- srcs = glob([
- "google/protobuf/*.js",
- "google/protobuf/compiler/*.js"
- ]) + [
- "google-protobuf.js",
- "package.json",
- "README.md",
- "LICENSE.md",
- "LICENSE-asserts.md",
- ],
- strip_prefix = strip_prefix.from_root(""),
-)
-
-pkg_tar(
- name = "dist_tar",
- srcs = [
- ":dist_files",
- ":plugin_files",
- ],
- extension = "tar.gz",
- package_file_name = "protobuf-javascript-{version}-{platform}.tar.gz",
- package_variables = ":protobuf_javascript_pkg_naming",
-)
-
-pkg_zip(
- name = "dist_zip",
- srcs = [
- ":dist_files",
- ":plugin_files",
- ],
- package_file_name = "protobuf-javascript-{version}-{platform}.zip",
- package_variables = ":protobuf_javascript_pkg_naming",
-)
-
filegroup(
- name = "dist_all",
+ name = "javascript",
srcs = [
- ":dist_tar",
- ":dist_zip",
- ]
+ "asserts.js",
+ "binary/any_field_type.js",
+ "binary/arith.js",
+ "binary/binary_constants.js",
+ "binary/bytesource.js",
+ "binary/bytesource_alias.js",
+ "binary/decoder.js",
+ "binary/decoder_alias.js",
+ "binary/encoder.js",
+ "binary/encoder_alias.js",
+ "binary/errors.js",
+ "binary/internal_buffer.js",
+ "binary/reader.js",
+ "binary/reader_alias.js",
+ "binary/repeated_field_type.js",
+ "binary/scalar_field_type.js",
+ "binary/test_utils.js",
+ "binary/utf8.js",
+ "binary/utils.js",
+ "binary/writer.js",
+ "binary/writer_alias.js",
+ "bytestring.js",
+ "debug.js",
+ "internal_bytes.js",
+ "internal_options.js",
+ "internal_public.js",
+ "map.js",
+ "message.js",
+ "unsafe_bytestring.js",
+ ],
+ visibility = ["//visibility:public"],
)