Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: stop checking go version in Makefile #685

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ help: ## list Makefile targets

###### Setup ##################################################################
IAAS=azure
GO-VERSION = 1.22.0
GO-VER = go$(GO-VERSION)
CSB_VERSION := $(or $(CSB_VERSION), $(shell grep 'github.com/cloudfoundry/cloud-service-broker' go.mod | grep -v replace | awk '{print $$NF}' | sed -e 's/v//'))
CSB_RELEASE_VERSION := $(CSB_VERSION)

Expand Down Expand Up @@ -37,17 +35,8 @@ GET_CSB="env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags $(LDFLAGS)

###### Targets ################################################################

.PHONY: deps-go-binary
deps-go-binary:
ifeq ($(SKIP_GO_VERSION_CHECK),)
@@if [ "$$(go version | awk '{print $$3}')" != "${GO-VER}" ]; then \
echo "Go version does not match: expected: ${GO-VER}, got $$(go version | awk '{print $$3}')"; \
exit 1; \
fi
endif

.PHONY: build
build: deps-go-binary $(IAAS)-services-*.brokerpak ## build brokerpak
build: $(IAAS)-services-*.brokerpak ## build brokerpak

$(IAAS)-services-*.brokerpak: *.yml terraform/*/*.tf ./providers/terraform-provider-csbmssqldbrunfailover/cloudfoundry.org/cloud-service-broker/csbmssqldbrunfailover | $(PAK_BUILD_CACHE_PATH)
$(RUN_CSB) pak build
Expand Down
13 changes: 1 addition & 12 deletions providers/terraform-provider-csbmssqldbrunfailover/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
.DEFAULT_GOAL = help

GO-VERSION = 1.22.0
GO-VER = go$(GO-VERSION)
GO=go

.PHONY: help
help: ## list Makefile targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

build: deps-go-binary cloudfoundry.org ## build the provider
build: cloudfoundry.org ## build the provider

cloudfoundry.org: *.go */*.go
mkdir -p cloudfoundry.org/cloud-service-broker/csbmssqldbrunfailover/1.0.0/linux_amd64
Expand Down Expand Up @@ -39,12 +37,3 @@ run-acceptance-tests-coverage: ## infrastructure tests coverage score
export TF_ACC=1; \
go test -coverpkg=`cat /tmp/tpmssqldbrunfailover-pkgs.txt` -coverprofile=/tmp/tpmssqldbrunfailover-coverage.out ./...
go tool cover -func /tmp/tpmssqldbrunfailover-coverage.out | grep total

.PHONY: deps-go-binary
deps-go-binary:
ifeq ($(SKIP_GO_VERSION_CHECK),)
@@if [ "$$($(GO) version | awk '{print $$3}')" != "${GO-VER}" ]; then \
echo "Go version does not match: expected: ${GO-VER}, got $$($(GO) version | awk '{print $$3}')"; \
exit 1; \
fi
endif
Loading