BUILD 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package(default_visibility = ["//visibility:public"])
  2. load(
  3. "@io_bazel_rules_go//go:def.bzl",
  4. "go_library",
  5. "go_binary",
  6. )
  7. go_library(
  8. name = "go_default_library",
  9. srcs = [
  10. "build.go",
  11. "doc.go",
  12. "init.go",
  13. "main.go",
  14. "project.go",
  15. "template.go",
  16. "update.go",
  17. "upgrade.go",
  18. "verification.go",
  19. "version.go",
  20. ],
  21. importpath = "go-common/app/tool/kratos",
  22. tags = ["automanaged"],
  23. visibility = ["//visibility:public"],
  24. deps = [
  25. "//vendor/github.com/AlecAivazis/survey:go_default_library",
  26. "//vendor/github.com/kr/pty:go_default_library",
  27. "//vendor/github.com/urfave/cli:go_default_library",
  28. ],
  29. )
  30. filegroup(
  31. name = "package-srcs",
  32. srcs = glob(["**"]),
  33. tags = ["automanaged"],
  34. visibility = ["//visibility:private"],
  35. )
  36. filegroup(
  37. name = "all-srcs",
  38. srcs = [":package-srcs"],
  39. tags = ["automanaged"],
  40. visibility = ["//visibility:public"],
  41. )
  42. go_binary(
  43. name = "kratos",
  44. embed = [":go_default_library"],
  45. tags = ["automanaged"],
  46. x_defs = {
  47. "main.Version": "3",
  48. "main.GitCommit": "{STABLE_BUILD_GIT_COMMIT}",
  49. "main.BuildTime": "{STABLE_BUILD_TIME}",
  50. "main.Channel": "release",
  51. },
  52. )