diff --git a/.github/workflows/build-binary-package.yml b/.github/workflows/build-binary-package.yml index ae51eaac..32d62231 100644 --- a/.github/workflows/build-binary-package.yml +++ b/.github/workflows/build-binary-package.yml @@ -27,7 +27,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.21.9 + go-version: 1.22.5 - name: Build all platforms run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a3c3c25e..5b9d3ca3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.21.9 + go-version: 1.22.5 - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f879a681..3ce73bd4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.21.9 + go-version: 1.22.5 - name: Build run: | diff --git a/.github/workflows/tests_deb.yml b/.github/workflows/tests_deb.yml index 24ea6fdc..89cf9ff2 100644 --- a/.github/workflows/tests_deb.yml +++ b/.github/workflows/tests_deb.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.21.9 + go-version: 1.22.5 - name: Cache virtualenvs id: cache-pipenv diff --git a/Makefile b/Makefile index 3303b5e0..014f12fe 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 @@ -64,7 +61,7 @@ clean: clean-release-dir clean-debian clean-rpm # .PHONY: binary -binary: goversion +binary: $(GOBUILD) $(LD_OPTS) -o $(BINARY_NAME) .PHONY: build @@ -79,7 +76,7 @@ lint: golangci-lint run .PHONY: test -test: goversion +test: @$(GOTEST) $(LD_OPTS) ./... .PHONY: func-tests @@ -133,7 +130,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 c2635f30..00000000 --- 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