Skip to content

Commit

Permalink
make: remove redundant go version check (#3118)
Browse files Browse the repository at this point in the history
It's already done by the toolchain with go.mod
  • Loading branch information
mmetc authored Jul 9, 2024
1 parent 96a6eec commit aa0c389
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 67 deletions.
19 changes: 7 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ BUILD_STATIC ?= 0
# List of plugins to build
PLUGINS ?= $(patsubst ./cmd/notification-%,%,$(wildcard ./cmd/notification-*))

# Can be overriden, if you can deal with the consequences
BUILD_REQUIRE_GO_MAJOR ?= 1
BUILD_REQUIRE_GO_MINOR ?= 21

#--------------------------------------

GO = go
Expand Down Expand Up @@ -128,10 +124,10 @@ endif
#--------------------------------------

.PHONY: build
build: pre-build goversion crowdsec cscli plugins ## Build crowdsec, cscli and plugins
build: build-info crowdsec cscli plugins ## Build crowdsec, cscli and plugins

.PHONY: pre-build
pre-build: ## Sanity checks and build information
.PHONY: build-info
build-info: ## Print build information
$(info Building $(BUILD_VERSION) ($(BUILD_TAG)) $(BUILD_TYPE) for $(GOOS)/$(GOARCH))

ifneq (,$(RE2_FAIL))
Expand Down Expand Up @@ -195,11 +191,11 @@ clean: clean-debian clean-rpm testclean ## Remove build artifacts
)

.PHONY: cscli
cscli: goversion ## Build cscli
cscli: ## Build cscli
@$(MAKE) -C $(CSCLI_FOLDER) build $(MAKE_FLAGS)

.PHONY: crowdsec
crowdsec: goversion ## Build crowdsec
crowdsec: ## Build crowdsec
@$(MAKE) -C $(CROWDSEC_FOLDER) build $(MAKE_FLAGS)

.PHONY: generate
Expand All @@ -223,11 +219,11 @@ testenv:
@echo 'NOTE: You need to run "make localstack" in a separate shell, "make localstack-stop" to terminate it'

.PHONY: test
test: testenv goversion ## Run unit tests with localstack
test: testenv ## Run unit tests with localstack
$(GOTEST) $(LD_OPTS) ./...

.PHONY: go-acc
go-acc: testenv goversion ## Run unit tests with localstack + coverage
go-acc: testenv ## Run unit tests with localstack + coverage
go-acc ./... -o coverage.out --ignore database,notifications,protobufs,cwversion,cstest,models -- $(LD_OPTS)

check_docker:
Expand Down Expand Up @@ -305,5 +301,4 @@ else
include test/bats.mk
endif

include mk/goversion.mk
include mk/help.mk
19 changes: 0 additions & 19 deletions mk/check_go_version.ps1

This file was deleted.

36 changes: 0 additions & 36 deletions mk/goversion.mk

This file was deleted.

0 comments on commit aa0c389

Please sign in to comment.