Skip to content

Commit 87a8a38

Browse files
committed
Introduce default github build target
All plugins are expected to have a main build target having the same name as the plugin's directory. Introduce the 'github' plugin which is the main node of the dependency of all other targets, including the one responsible for extracting the plugin's version into a version file. Change-Id: I9fb3694e5fb2c4cbf0455d54281ee2677429d16f
1 parent 06bcc59 commit 87a8a38

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

BUILD

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,30 @@
1+
load("//tools/bzl:genrule2.bzl", "genrule2")
2+
3+
genrule(
4+
name = "github",
5+
srcs = [
6+
":github-plugin",
7+
":github-plugin-version",
8+
":github-oauth",
9+
],
10+
outs = ["github.zip"],
11+
cmd = "zip -o $@ $(SRCS)",
12+
)
13+
114
genrule(
215
name = "github-oauth",
316
srcs = ["//plugins/github/github-oauth:github-oauth_deploy.jar"],
417
outs = ["github-oauth.jar"],
518
cmd = "cp $< $@",
619
)
720

21+
genrule2(
22+
name = "github-plugin-version",
23+
srcs = [":github-plugin"],
24+
outs = ["github-plugin.jar-version"],
25+
cmd = "jar xvf $< META-INF/MANIFEST.MF; cat META-INF/MANIFEST.MF | grep Implementation-Version | cut -d ':' -f 2 | xargs > $@",
26+
)
27+
828
genrule(
929
name = "github-plugin",
1030
srcs = ["//plugins/github/github-plugin"],

0 commit comments

Comments
 (0)