diff --git a/Makefile b/Makefile index 55730e2..e01f04a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,3 @@ -BUILD_REQUIRE_GO_MAJOR ?= 1 -BUILD_REQUIRE_GO_MINOR ?= 20 - GO = go GOBUILD = $(GO) build GOTEST = $(GO) test @@ -59,7 +56,7 @@ clean: clean-release-dir clean-debian clean-rpm # .PHONY: binary -binary: goversion +binary: $(GOBUILD) $(LD_OPTS) -o $(BINARY_NAME) .PHONY: build @@ -74,7 +71,7 @@ lint: golangci-lint run .PHONY: test -test: goversion +test: @$(GOTEST) $(LD_OPTS) ./... .PHONY: func-tests @@ -128,7 +125,5 @@ release: clean tarball # .PHONY: platform-all -platform-all: goversion clean +platform-all: clean python3 .github/release.py run-build $(BINARY_NAME) - -include mk/goversion.mk diff --git a/mk/goversion.mk b/mk/goversion.mk deleted file mode 100644 index c2635f3..0000000 --- a/mk/goversion.mk +++ /dev/null @@ -1,31 +0,0 @@ - -BUILD_GOVERSION = $(subst go,,$(shell $(GO) env GOVERSION)) - -go_major_minor = $(subst ., ,$(BUILD_GOVERSION)) -GO_MAJOR_VERSION = $(word 1, $(go_major_minor)) -GO_MINOR_VERSION = $(word 2, $(go_major_minor)) - -GO_VERSION_VALIDATION_ERR_MSG = Golang version ($(BUILD_GOVERSION)) is not supported, please use at least $(BUILD_REQUIRE_GO_MAJOR).$(BUILD_REQUIRE_GO_MINOR) - - -.PHONY: goversion -goversion: $(if $(findstring devel,$(shell $(GO) env GOVERSION)),goversion_devel,goversion_check) - - -.PHONY: goversion_devel -goversion_devel: - $(warning WARNING: You are using a development version of Golang ($(BUILD_GOVERSION)) which is not supported. For production environments, use a stable version (at least $(BUILD_REQUIRE_GO_MAJOR).$(BUILD_REQUIRE_GO_MINOR))) - $(info ) - - -.PHONY: goversion_check -goversion_check: - @if [ $(GO_MAJOR_VERSION) -gt $(BUILD_REQUIRE_GO_MAJOR) ]; then \ - exit 0; \ - elif [ $(GO_MAJOR_VERSION) -lt $(BUILD_REQUIRE_GO_MAJOR) ]; then \ - echo '$(GO_VERSION_VALIDATION_ERR_MSG)';\ - exit 1; \ - elif [ $(GO_MINOR_VERSION) -lt $(BUILD_REQUIRE_GO_MINOR) ] ; then \ - echo '$(GO_VERSION_VALIDATION_ERR_MSG)';\ - exit 1; \ - fi