You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gomud/cmd/echo/BUILD.bazel

61 lines
1.3 KiB
Python

load("@rules_go//go:def.bzl", "go_binary", "go_cross_binary", "go_library")
go_library(
name = "echo_lib",
srcs = ["main.go"],
importpath = "code.ndumas.com/ndumas/gomud/cmd/echo",
visibility = ["//visibility:private"],
deps = [
"//:gomud",
"//engine",
"//logger",
"//telnet",
"@com_github_engoengine_ecs//:ecs",
"@com_github_threedotslabs_watermill//message",
"@com_github_threedotslabs_watermill//message/router/middleware",
"@com_github_threedotslabs_watermill//message/router/plugin",
"@com_github_threedotslabs_watermill//pubsub/gochannel",
],
)
go_binary(
name = "echo",
embed = [":echo_lib"],
visibility = ["//visibility:public"],
)
go_cross_binary(
name = "cross_binary",
sdk_version = "1.21.0",
target = ":echo",
)
load("@rules_pkg//:pkg.bzl", "pkg_tar")
pkg_tar(
name = "tar",
srcs = [":echo"],
)
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_push")
filegroup(
name = "docker_labels",
srcs = ["labels.txt"],
)
oci_image(
name = "image",
base = "@distroless_base",
entrypoint = ["/echo"],
tars = [":tar"],
labels = ":docker_labels",
)
oci_push(
name = "registry",
image = ":image",
remote_tags = ["latest"],
repository = "code.ndumas.com/ndumas/gomud",
)