Skip to content

Commit 9b29e36

Browse files
committed
Format bzl files with buildifier 0.12.0
Change-Id: Ic6888d5338b20dfdee1bd7ab65c544c4e041530a
1 parent 55a49f4 commit 9b29e36

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

tools/bazlets.bzl

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
NAME = "com_googlesource_gerrit_bazlets"
22

33
def load_bazlets(
4-
commit = None,
5-
local_path = None
6-
):
7-
if not local_path:
8-
native.git_repository(
9-
name = NAME,
10-
remote = "https://gerrit.googlesource.com/bazlets",
11-
commit = commit,
12-
)
13-
else:
14-
native.local_repository(
15-
name = NAME,
16-
path = local_path,
17-
)
4+
commit = None,
5+
local_path = None):
6+
if not local_path:
7+
native.git_repository(
8+
name = NAME,
9+
remote = "https://gerrit.googlesource.com/bazlets",
10+
commit = commit,
11+
)
12+
else:
13+
native.local_repository(
14+
name = NAME,
15+
path = local_path,
16+
)

tools/stamper.bzl

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
load("@com_googlesource_gerrit_bazlets//tools:genrule2.bzl", "genrule2")
33

44
def stamp(workspace, name):
5-
# TODO(davido): Remove manual merge of manifest file when this feature
6-
# request is implemented: https://github.com/bazelbuild/bazel/issues/2009
7-
genrule2(
8-
name = "%s-stamped" % name,
9-
stamp = 1,
10-
srcs = [":%s" % name],
11-
cmd = " && ".join([
12-
"GEN_VERSION=$$(cat bazel-out/stable-status.txt | grep -w STABLE_BUILD_%s_LABEL | cut -d ' ' -f 2)" % workspace.upper(),
13-
"cd $$TMP",
14-
"unzip -q $$ROOT/$<",
15-
"echo \"Implementation-Version: $$GEN_VERSION\n$$(cat META-INF/MANIFEST.MF)\" > META-INF/MANIFEST.MF",
16-
"zip -qr $$ROOT/$@ ."]),
17-
outs = ["%s-stamped.jar" % name],
18-
visibility = ["//visibility:public"],
19-
)
20-
5+
# TODO(davido): Remove manual merge of manifest file when this feature
6+
# request is implemented: https://github.com/bazelbuild/bazel/issues/2009
7+
genrule2(
8+
name = "%s-stamped" % name,
9+
stamp = 1,
10+
srcs = [":%s" % name],
11+
cmd = " && ".join([
12+
"GEN_VERSION=$$(cat bazel-out/stable-status.txt | grep -w STABLE_BUILD_%s_LABEL | cut -d ' ' -f 2)" % workspace.upper(),
13+
"cd $$TMP",
14+
"unzip -q $$ROOT/$<",
15+
"echo \"Implementation-Version: $$GEN_VERSION\n$$(cat META-INF/MANIFEST.MF)\" > META-INF/MANIFEST.MF",
16+
"zip -qr $$ROOT/$@ .",
17+
]),
18+
outs = ["%s-stamped.jar" % name],
19+
visibility = ["//visibility:public"],
20+
)

0 commit comments

Comments
 (0)