From 74348afa4753abfb51c2bc134488fb9089f1e5f8 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Wed, 23 Sep 2020 21:13:02 -0400 Subject: [PATCH] chore: fix an intermittent gazelle race --- hack/gazelle.sh | 1 + src/gripkit/BUILD.bazel | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/hack/gazelle.sh b/hack/gazelle.sh index 9676b70..673ddfa 100755 --- a/hack/gazelle.sh +++ b/hack/gazelle.sh @@ -5,6 +5,7 @@ cd `dirname $(realpath $0)` bazel run //:gazelle bazel run //:gazelle -- update-repos -from_file=./go.mod --to_macro=deps.bzl%go_repositories -prune=true +sleep 0.5 echo "Fixing deps.bzl..." head -n2 ../deps.bzl > ../deps.bzl~ tail -n+3 ../deps.bzl | sed '/^$/d' >> ../deps.bzl~ diff --git a/src/gripkit/BUILD.bazel b/src/gripkit/BUILD.bazel index b128a1c..65c15be 100644 --- a/src/gripkit/BUILD.bazel +++ b/src/gripkit/BUILD.bazel @@ -1,14 +1,16 @@ -# go_library( -# name = "gripkit", -# srcs = [ -# "gripkit.go", -# "options.go", -# ], -# importpath = "github.com/roleypoly/roleypoly/src/gripkit", -# visibility = ["//visibility:public"], -# deps = [ -# "@com_github_improbable_eng_grpc_web//go/grpcweb", -# "@io_k8s_klog//:klog", -# "@org_golang_google_grpc//:go_default_library", -# ], -# ) +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "gripkit", + srcs = [ + "gripkit.go", + "options.go", + ], + importpath = "github.com/roleypoly/roleypoly/src/gripkit", + visibility = ["//visibility:public"], + deps = [ + "@com_github_improbable_eng_grpc_web//go/grpcweb", + "@io_k8s_klog//:klog", + "@org_golang_google_grpc//:go_default_library", + ], +)