load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("//hack:def.bzl", "image")

image(
    name = "image",
    binary = ":acmesolver",
    component = "acmesolver",
    visibility = ["//visibility:public"],
)

go_library(
    name = "go_default_library",
    srcs = ["main.go"],
    importpath = "github.com/jetstack/cert-manager/cmd/acmesolver",
    visibility = ["//visibility:private"],
    deps = [
        "//pkg/issuer/acme/http/solver:go_default_library",
        "//pkg/logs:go_default_library",
    ],
)

go_binary(
    name = "acmesolver",
    embed = [":go_default_library"],
    pure = "on",
    visibility = ["//visibility:public"],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [":package-srcs"],
    tags = ["automanaged"],
    visibility = ["//visibility:public"],
)
