File tree Expand file tree Collapse file tree 3 files changed +49
-7
lines changed Expand file tree Collapse file tree 3 files changed +49
-7
lines changed Original file line number Diff line number Diff line change 11module (
22 name = "rules_java" ,
3- version = "8.4.0 " ,
3+ version = "8.5.0-rc1 " ,
44 bazel_compatibility = [">=6.3.0" ],
55 compatibility_level = 1 ,
66)
Original file line number Diff line number Diff line change 11load ("@rules_pkg//pkg:tar.bzl" , "pkg_tar" )
2- load ("@rules_pkg//pkg/releasing:defs .bzl" , "print_rel_notes" )
2+ load (":relnotes .bzl" , "print_rel_notes" )
33
44package (default_visibility = ["//visibility:private" ])
55
@@ -18,10 +18,6 @@ pkg_tar(
1818
1919print_rel_notes (
2020 name = "relnotes" ,
21- outs = ["relnotes.txt" ],
22- deps_method = "rules_java_dependencies" ,
23- repo = "rules_java" ,
24- setup_file = "java:repositories.bzl" ,
25- toolchains_method = "rules_java_toolchains" ,
21+ archive = ":rules_java-%s" % module_version (),
2622 version = module_version (),
2723)
Original file line number Diff line number Diff line change 1+ """Release notes generator"""
2+
3+ def print_rel_notes (* , name , version , archive ):
4+ native .genrule (
5+ name = name ,
6+ outs = [name + ".txt" ],
7+ cmd = """
8+ last_rel=$$(curl -s https://api.github.com/repos/bazelbuild/rules_java/releases/latest | grep 'tag_name' | cut -d: -f2 | tr -cd '[:alnum:].')
9+ changelog=$$(/usr/bin/git log tags/$$last_rel..origin/master --format=oneline --)
10+ sha=$$(/usr/bin/sha256sum $(SRCS) | cut -d ' ' -f1)
11+ cat > $@ <<EOF
12+ **Changes since $$last_rel
13+ $$changelog
14+
15+ **MODULE.bazel setup**
16+ ~~~
17+ bazel_dep(name = "rules_java", version = "{VERSION}")
18+ ~~~
19+
20+ **WORKSPACE setup**
21+ ~~~
22+ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
23+ http_archive(
24+ name = "rules_java",
25+ urls = [
26+ "https://github.com/bazelbuild/rules_java/releases/download/{VERSION}/rules_java-{VERSION}.tar.gz",
27+ ],
28+ sha256 = "$$sha",
29+ )
30+
31+ load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")
32+ rules_java_dependencies()
33+ load("@com_google_protobuf//bazel/private:proto_bazel_features.bzl", "proto_bazel_features") # buildifier: disable=bzl-visibility
34+ proto_bazel_features(name = "proto_bazel_features")
35+ load("@rules_java//java:repositories.bzl", "rules_java_toolchains")
36+ rules_java_toolchains()
37+ ~~~
38+
39+ **Using the rules**
40+ See [the source](https://github.com/bazelbuild/rules_java/tree/{VERSION}).
41+
42+ EOF
43+ """ .format (ARCHIVE = archive , VERSION = version ),
44+ srcs = [archive ],
45+ tags = ["local" , "manual" ],
46+ )
You can’t perform that action at this time.
0 commit comments