Quellcode durchsuchen

Update bazel build rules for moved paths

Breandan Dezendorf vor 2 Jahren
Ursprung
Commit
3424756d15

+ 3 - 3
dezendorf/applications/astoria-hc/cmd/BUILD.bazel

@@ -22,11 +22,11 @@ go_binary(
 go_library(
     name = "cmd_lib",
     srcs = ["main.go"],
-    importpath = "github.com/example/project/dezendorf/astoria-hc/cmd",
+    importpath = "github.com/example/project/dezendorf/applications/astoria-hc/cmd",
     visibility = ["//visibility:private"],
     deps = [
-        "//dezendorf/astoria-hc/vendor/github.com/brutella/hc",
-        "//dezendorf/astoria-hc/vendor/github.com/brutella/hc/accessory",
+        "@com_github_brutella_hc//:go_default_library",
+        "@com_github_brutella_hc//accessory:go_default_library",
         "@com_github_bwdezend_astoria_hc//internal/core:go_default_library",
         "@com_github_bwdezend_astoria_hc//internal/telemetry:go_default_library",
     ],

+ 4 - 4
dezendorf/applications/astoria-hc/internal/core/BUILD.bazel

@@ -7,12 +7,12 @@ go_library(
         "gpio.go",
         "persist.go",
     ],
-    importpath = "github.com/example/project/dezendorf/astoria-hc/internal/core",
+    importpath = "github.com/example/project/dezendorf/applications/astoria-hc/internal/core",
     visibility = ["//astoria-hc:__subpackages__"],
     deps = [
-        "//dezendorf/astoria-hc/vendor/github.com/brutella/hc/accessory",
-        "//dezendorf/astoria-hc/vendor/github.com/stianeikeland/go-rpio",
-        "//dezendorf/astoria-hc/vendor/github.com/vemo-france/max31865",
+        "@com_github_brutella_hc//accessory:go_default_library",
         "@com_github_bwdezend_astoria_hc//internal/telemetry:go_default_library",
+        "@com_github_stianeikeland_go_rpio//:go_default_library",
+        "@com_github_vemo_france_max31865//:go_default_library",
     ],
 )

+ 4 - 4
dezendorf/applications/astoria-hc/internal/telemetry/BUILD.bazel

@@ -3,11 +3,11 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
 go_library(
     name = "telemetry",
     srcs = ["prom.go"],
-    importpath = "github.com/example/project/dezendorf/astoria-hc/internal/telemetry",
+    importpath = "github.com/example/project/dezendorf/applications/astoria-hc/internal/telemetry",
     visibility = ["//astoria-hc:__subpackages__"],
     deps = [
-        "//dezendorf/astoria-hc/vendor/github.com/prometheus/client_golang/prometheus",
-        "//dezendorf/astoria-hc/vendor/github.com/prometheus/client_golang/prometheus/promauto",
-        "//dezendorf/astoria-hc/vendor/github.com/prometheus/client_golang/prometheus/promhttp",
+        "@com_github_prometheus_client_golang//prometheus:go_default_library",
+        "@com_github_prometheus_client_golang//prometheus/promauto:go_default_library",
+        "@com_github_prometheus_client_golang//prometheus/promhttp:go_default_library",
     ],
 )

+ 0 - 6
dezendorf/applications/golink/BUILD.bazel

@@ -1,6 +0,0 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_binary")
-
-go_binary(
-  name = "cmd",
-  srcs = ["cmd/main/main.go"],
-)

+ 14 - 0
dezendorf/applications/golink/cmd/main/BUILD.bazel

@@ -0,0 +1,14 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
+
+go_library(
+    name = "main_lib",
+    srcs = ["main.go"],
+    importpath = "github.com/example/project/dezendorf/applications/golink/cmd/main",
+    visibility = ["//visibility:private"],
+)
+
+go_binary(
+    name = "main",
+    embed = [":main_lib"],
+    visibility = ["//visibility:public"],
+)

+ 4 - 4
dezendorf/applications/occupancyd/internal/core/BUILD.bazel

@@ -3,12 +3,12 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
 go_library(
     name = "core",
     srcs = ["app.go"],
-    importpath = "github.com/example/project/dezendorf/occupancyd/internal/core",
+    importpath = "github.com/example/project/dezendorf/applications/occupancyd/internal/core",
     visibility = ["//dezendorf/occupancyd:__subpackages__"],
     deps = [
-        "//dezendorf/occupancyd/vendor/github.com/brutella/hc/accessory",
-        "//dezendorf/occupancyd/vendor/github.com/brutella/hc/log",
-        "//dezendorf/occupancyd/vendor/github.com/brutella/hc/service",
+        "@com_github_brutella_hc//accessory:go_default_library",
+        "@com_github_brutella_hc//log:go_default_library",
+        "@com_github_brutella_hc//service:go_default_library",
         "@com_github_burntsushi_xgb//:go_default_library",
         "@com_github_burntsushi_xgb//dpms:go_default_library",
         "@com_github_burntsushi_xgb//screensaver:go_default_library",

+ 1 - 1
dezendorf/applications/occupancyd/internal/telemetry/BUILD.bazel

@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
 go_library(
     name = "telemetry",
     srcs = ["prom.go"],
-    importpath = "github.com/example/project/dezendorf/occupancyd/internal/telemetry",
+    importpath = "github.com/example/project/dezendorf/applications/occupancyd/internal/telemetry",
     visibility = ["//dezendorf/occupancyd:__subpackages__"],
     deps = [
         "@com_github_prometheus_client_golang//prometheus:go_default_library",