Bazelify the PolyGerrit dev server
Formerly, developers were directed to install Go and a specific library dependency on their workstation. We can pull this all into bazel using bazelbuild/rules_go and bazelbuild/bazel-gazelle. Now, instead of running a script from a specific directory, the dev server can be started with a simple "bazel run" command. Or, continue using the script, which automatically releases the bazel lock before starting the server. Change-Id: I9dbda32a8c8698b3f43d02b2133d3cecbffaf1c3
This commit is contained in:
committed by
David Ostrovsky
parent
60f59f1cdf
commit
784849c2ca
@@ -2,6 +2,7 @@ package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary")
|
||||
load("//tools/bzl:js.bzl", "bower_component_bundle")
|
||||
load("//tools/bzl:genrule2.bzl", "genrule2")
|
||||
|
||||
@@ -52,3 +53,19 @@ genrule2(
|
||||
output_to_bindir = 1,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "devserver",
|
||||
srcs = ["server.go"],
|
||||
data = [
|
||||
":fonts.zip",
|
||||
"//polygerrit-ui/app:test_components.zip",
|
||||
"//resources/com/google/gerrit/httpd/raw",
|
||||
],
|
||||
deps = [
|
||||
"@com_github_robfig_soy//:go_default_library",
|
||||
"@com_github_robfig_soy//soyhtml:go_default_library",
|
||||
"@org_golang_x_tools//godoc/vfs/httpfs:go_default_library",
|
||||
"@org_golang_x_tools//godoc/vfs/zipfs:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user