Skip to content

Commit 00bc9cf

Browse files
authored
chore: fix the cloud-service-broker build (#954)
- The cloud-service-broker dependency was updated to be a Go 1.24 tool - This did not work because you can't "go build" a tool, so it's been reverted - Also "make build" will now build the cloud-service-broker too, as this is typically used as the litmus test of whether everything is working, and in this case we had a miss.
1 parent 7851889 commit 00bc9cf

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ BROKER_GO_OPTS=PORT=8080 \
2828
GSB_PROVISION_DEFAULTS='$(GSB_PROVISION_DEFAULTS)'
2929

3030
PAK_PATH=$(PWD)
31-
RUN_CSB=$(BROKER_GO_OPTS) go tool cloud-service-broker
31+
RUN_CSB=$(BROKER_GO_OPTS) go run github.com/cloudfoundry/cloud-service-broker/v2
3232

3333
LDFLAGS="-X github.com/cloudfoundry/cloud-service-broker/v2/utils.Version=$(CSB_VERSION)"
3434
GET_CSB="env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags $(LDFLAGS) github.com/cloudfoundry/cloud-service-broker/v2"
3535

3636
###### Targets ################################################################
3737

3838
.PHONY: build
39-
build: $(IAAS)-services-*.brokerpak ## build brokerpak
39+
build: cloud-service-broker $(IAAS)-services-*.brokerpak ## build brokerpak
4040

4141
$(IAAS)-services-*.brokerpak: *.yml terraform/*/*.tf ./providers/terraform-provider-csbmssqldbrunfailover/cloudfoundry.org/cloud-service-broker/csbmssqldbrunfailover | $(PAK_BUILD_CACHE_PATH)
4242
$(RUN_CSB) pak build

go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ require (
141141
)
142142

143143
tool (
144-
github.com/cloudfoundry/cloud-service-broker/v2
145144
github.com/onsi/ginkgo/v2/ginkgo
146145
golang.org/x/tools/cmd/goimports
147146
honnef.co/go/tools/cmd/staticcheck

tools/tools.go

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//go:build tools
2+
// +build tools
3+
4+
package tools
5+
6+
import (
7+
_ "github.com/cloudfoundry/cloud-service-broker/v2"
8+
)
9+
10+
// This file imports the Cloud Service Broker in order to pin the version
11+
// For other tools, use "go get -tool"

0 commit comments

Comments
 (0)