File tree Expand file tree Collapse file tree 8 files changed +81
-4
lines changed Expand file tree Collapse file tree 8 files changed +81
-4
lines changed Original file line number Diff line number Diff line change @@ -19,18 +19,30 @@ The output for all the example plugins is created in
19
19
bazel-genfiles/all.zip
20
20
21
21
22
- To build a specific example plugin, issue the following command :
22
+ To build a specific example plugin, issue one of the following commands :
23
23
24
24
25
25
bazel build example-<example>
26
26
27
+ OR
28
+
29
+ cd example-<example> && bazel build example-<example>
27
30
28
- The output for the example is created in
31
+
32
+ If the build command is run from the top-level example directory,
33
+ the output for the example is created in
29
34
30
35
31
36
bazel-genfiles/example-<example>/example-<example>.jar
32
37
33
38
39
+ If the build command is run from inside a specific example directory,
40
+ the output for the example is created in
41
+
42
+
43
+ example-<example>/bazel-genfiles/example-<example>.jar
44
+
45
+
34
46
35
47
Buck Build
36
48
==========
Original file line number Diff line number Diff line change
1
+ workspace (name = "simpleSshCommand" )
2
+
3
+ load ("//:bazlets.bzl" , "load_bazlets" )
4
+
5
+ load_bazlets (
6
+ commit = "0f87babe07a555425d829c6e7951e296e9e24579" ,
7
+ # local_path = "/home/<user>/projects/bazlets",
8
+ )
9
+
10
+ # Release Plugin API
11
+ load (
12
+ "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl" ,
13
+ "gerrit_api" ,
14
+ )
15
+
16
+ # Snapshot Plugin API
17
+ #load(
18
+ # "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl",
19
+ # "gerrit_api_maven_local",
20
+ #)
21
+
22
+ # Load release Plugin API
23
+ gerrit_api ()
24
+
25
+ # Load snapshot Plugin API
26
+ #gerrit_api_maven_local()
Original file line number Diff line number Diff line change
1
+ NAME = "com_googlesource_gerrit_bazlets"
2
+
3
+ def load_bazlets (
4
+ commit ,
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
+ )
Original file line number Diff line number Diff line change
1
+ build --workspace_status_command=./tools/workspace-status.sh
2
+ test --build_tests_only
Original file line number Diff line number Diff line change
1
+ load (
2
+ "@com_googlesource_gerrit_bazlets//:gerrit_plugin.bzl" ,
3
+ "gerrit_plugin" ,
4
+ )
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # This script will be run by bazel when the build process starts to
4
+ # generate key-value information that represents the status of the
5
+ # workspace. The output should be like
6
+ #
7
+ # KEY1 VALUE1
8
+ # KEY2 VALUE2
9
+ #
10
+ # If the script exits with non-zero code, it's considered as a failure
11
+ # and the output will be discarded.
12
+
13
+ function rev() {
14
+ git describe --always --match " v[0-9].*" --dirty
15
+ }
16
+
17
+ echo STABLE_BUILD_EXAMPLE-SIMPLESSHCOMMAND_LABEL $( rev)
Original file line number Diff line number Diff line change @@ -16,6 +16,5 @@ function rev() {
16
16
17
17
for p in example-* ; do
18
18
test -d " $p " || continue
19
- # special treatment of nested example plugins
20
- echo STABLE_BUILD_$( echo $( basename $p ) _LABEL| tr ' [a-z]' ' [A-Z]' ) $( rev $p )
19
+ ./$p /tools/workspace-status.sh
21
20
done
You can’t perform that action at this time.
0 commit comments