Skip to content

Commit 2f205a4

Browse files
committed
Bump version and prepare for release
1 parent 9384cb4 commit 2f205a4

File tree

2 files changed

+34
-35
lines changed

2 files changed

+34
-35
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "google-protobuf",
3-
"version": "3.21.0",
3+
"version": "3.21.1",
44
"description": "Protocol Buffers for JavaScript",
55
"main": "google-protobuf.js",
66
"files": [

protobuf_javascript_release.bzl

+33-34
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,46 @@ Generates package naming variables for use with rules_pkg.
55
load("@rules_pkg//:providers.bzl", "PackageVariablesInfo")
66
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
77

8-
_PROTOBUF_JAVASCRIPT_VERSION = '3.21.0'
8+
_PROTOBUF_JAVASCRIPT_VERSION = "3.21.1"
99

1010
def _package_naming_impl(ctx):
11-
values = {}
12-
values["version"] = _PROTOBUF_JAVASCRIPT_VERSION
13-
14-
# infer from the current cpp toolchain.
15-
toolchain = find_cpp_toolchain(ctx)
16-
cpu = toolchain.cpu
17-
system_name = toolchain.target_gnu_system_name
18-
19-
# rename cpus to match what we want artifacts to be
20-
if cpu == "systemz":
21-
cpu = "s390_64"
22-
elif cpu == "aarch64":
23-
cpu = "aarch_64"
24-
elif cpu == "ppc64":
25-
cpu = "ppcle_64"
26-
27-
# use the system name to determine the os and then create platform names
28-
if "apple" in system_name:
29-
values["platform"] = "osx-" + cpu
30-
elif "linux" in system_name:
31-
values["platform"] = "linux-" + cpu
32-
elif "mingw" in system_name:
33-
if cpu == "x86_64":
34-
values["platform"] = "win64"
11+
values = {}
12+
values["version"] = _PROTOBUF_JAVASCRIPT_VERSION
13+
14+
# infer from the current cpp toolchain.
15+
toolchain = find_cpp_toolchain(ctx)
16+
cpu = toolchain.cpu
17+
system_name = toolchain.target_gnu_system_name
18+
19+
# rename cpus to match what we want artifacts to be
20+
if cpu == "systemz":
21+
cpu = "s390_64"
22+
elif cpu == "aarch64":
23+
cpu = "aarch_64"
24+
elif cpu == "ppc64":
25+
cpu = "ppcle_64"
26+
27+
# use the system name to determine the os and then create platform names
28+
if "apple" in system_name:
29+
values["platform"] = "osx-" + cpu
30+
elif "linux" in system_name:
31+
values["platform"] = "linux-" + cpu
32+
elif "mingw" in system_name:
33+
if cpu == "x86_64":
34+
values["platform"] = "win64"
35+
else:
36+
values["platform"] = "win32"
3537
else:
36-
values["platform"] = "win32"
37-
else:
38-
values["platform"] = "unknown"
39-
40-
return PackageVariablesInfo(values = values)
38+
values["platform"] = "unknown"
4139

40+
return PackageVariablesInfo(values = values)
4241

4342
package_naming = rule(
44-
implementation = _package_naming_impl,
43+
implementation = _package_naming_impl,
4544
attrs = {
46-
# Necessary data dependency for find_cpp_toolchain.
47-
"_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")),
45+
# Necessary data dependency for find_cpp_toolchain.
46+
"_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")),
4847
},
4948
toolchains = ["@bazel_tools//tools/cpp:toolchain_type"],
5049
incompatible_use_toolchain_transition = True,
51-
)
50+
)

0 commit comments

Comments
 (0)