From 90d3a218535e378e76462c7a96d47b17ffaa3ce3 Mon Sep 17 00:00:00 2001 From: mmetc <92726601+mmetc@users.noreply.github.com> Date: Wed, 6 Dec 2023 12:38:36 +0100 Subject: [PATCH] CI: use go 1.21.5 (#2640) * use go 1.21.5 * Simpler go:build directives --- .github/workflows/bats-hub.yml | 2 +- .github/workflows/bats-mysql.yml | 2 +- .github/workflows/bats-postgres.yml | 2 +- .github/workflows/bats-sqlite-coverage.yml | 2 +- .github/workflows/ci-windows-build-msi.yml | 2 +- .github/workflows/go-tests-windows.yml | 2 +- .github/workflows/go-tests.yml | 2 +- .github/workflows/release_publish-package.yml | 2 +- Dockerfile | 2 +- Dockerfile.debian | 2 +- azure-pipelines.yml | 2 +- cmd/crowdsec/run_in_svc.go | 3 +-- cmd/crowdsec/win_service.go | 1 - cmd/crowdsec/win_service_install.go | 1 - cmd/crowdsec/win_service_manage.go | 2 +- pkg/acquisition/modules/file/tailline.go | 2 +- pkg/acquisition/modules/file/tailline_windows.go | 2 +- pkg/acquisition/modules/wineventlog/wineventlog_test.go | 1 - test/ansible/vars/go.yml | 2 +- 19 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/bats-hub.yml b/.github/workflows/bats-hub.yml index e0b274f24d2..b9326b46227 100644 --- a/.github/workflows/bats-hub.yml +++ b/.github/workflows/bats-hub.yml @@ -15,7 +15,7 @@ jobs: build: strategy: matrix: - go-version: ["1.21.4"] + go-version: ["1.21.5"] name: "Build + tests" runs-on: ubuntu-latest diff --git a/.github/workflows/bats-mysql.yml b/.github/workflows/bats-mysql.yml index d72226658b3..e0ea4001fee 100644 --- a/.github/workflows/bats-mysql.yml +++ b/.github/workflows/bats-mysql.yml @@ -14,7 +14,7 @@ jobs: build: strategy: matrix: - go-version: ["1.21.4"] + go-version: ["1.21.5"] name: "Build + tests" runs-on: ubuntu-latest diff --git a/.github/workflows/bats-postgres.yml b/.github/workflows/bats-postgres.yml index 6076db4fd4b..af870ed83f3 100644 --- a/.github/workflows/bats-postgres.yml +++ b/.github/workflows/bats-postgres.yml @@ -10,7 +10,7 @@ jobs: build: strategy: matrix: - go-version: ["1.21.4"] + go-version: ["1.21.5"] name: "Build + tests" runs-on: ubuntu-latest diff --git a/.github/workflows/bats-sqlite-coverage.yml b/.github/workflows/bats-sqlite-coverage.yml index 789c261f6ba..2f2b15e11f8 100644 --- a/.github/workflows/bats-sqlite-coverage.yml +++ b/.github/workflows/bats-sqlite-coverage.yml @@ -11,7 +11,7 @@ jobs: build: strategy: matrix: - go-version: ["1.21.4"] + go-version: ["1.21.5"] name: "Build + tests" runs-on: ubuntu-latest diff --git a/.github/workflows/ci-windows-build-msi.yml b/.github/workflows/ci-windows-build-msi.yml index d4d3edacb9a..deff0306316 100644 --- a/.github/workflows/ci-windows-build-msi.yml +++ b/.github/workflows/ci-windows-build-msi.yml @@ -23,7 +23,7 @@ jobs: build: strategy: matrix: - go-version: ["1.21.4"] + go-version: ["1.21.5"] name: Build runs-on: windows-2019 diff --git a/.github/workflows/go-tests-windows.yml b/.github/workflows/go-tests-windows.yml index 868eae92afa..6941a349783 100644 --- a/.github/workflows/go-tests-windows.yml +++ b/.github/workflows/go-tests-windows.yml @@ -22,7 +22,7 @@ jobs: build: strategy: matrix: - go-version: ["1.21.4"] + go-version: ["1.21.5"] name: "Build + tests" runs-on: windows-2022 diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index b55431e144a..78bed2a40dd 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -34,7 +34,7 @@ jobs: build: strategy: matrix: - go-version: ["1.21.4"] + go-version: ["1.21.5"] name: "Build + tests" runs-on: ubuntu-latest diff --git a/.github/workflows/release_publish-package.yml b/.github/workflows/release_publish-package.yml index e45e882db68..b2784d391b0 100644 --- a/.github/workflows/release_publish-package.yml +++ b/.github/workflows/release_publish-package.yml @@ -14,7 +14,7 @@ jobs: build: strategy: matrix: - go-version: ["1.21.4"] + go-version: ["1.21.5"] name: Build and upload binary package runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index a4cedfd5a5b..f04f6cb1959 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # vim: set ft=dockerfile: -ARG GOVERSION=1.21.4 +ARG GOVERSION=1.21.5 FROM golang:${GOVERSION}-alpine AS build diff --git a/Dockerfile.debian b/Dockerfile.debian index c3a29af7f80..02e0d017d1e 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -1,5 +1,5 @@ # vim: set ft=dockerfile: -ARG GOVERSION=1.21.4 +ARG GOVERSION=1.21.5 FROM golang:${GOVERSION}-bookworm AS build diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f784432602e..1b7cd496001 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,7 +27,7 @@ stages: - task: GoTool@0 displayName: "Install Go 1.20" inputs: - version: '1.21.4' + version: '1.21.5' - pwsh: | choco install -y make diff --git a/cmd/crowdsec/run_in_svc.go b/cmd/crowdsec/run_in_svc.go index 8a2f985423a..563f758c606 100644 --- a/cmd/crowdsec/run_in_svc.go +++ b/cmd/crowdsec/run_in_svc.go @@ -1,5 +1,4 @@ -//go:build linux || freebsd || netbsd || openbsd || solaris || !windows -// +build linux freebsd netbsd openbsd solaris !windows +//go:build !windows package main diff --git a/cmd/crowdsec/win_service.go b/cmd/crowdsec/win_service.go index ab9ecc8151f..ff28f22faa8 100644 --- a/cmd/crowdsec/win_service.go +++ b/cmd/crowdsec/win_service.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package main diff --git a/cmd/crowdsec/win_service_install.go b/cmd/crowdsec/win_service_install.go index b497bc93182..85b35420264 100644 --- a/cmd/crowdsec/win_service_install.go +++ b/cmd/crowdsec/win_service_install.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package main diff --git a/cmd/crowdsec/win_service_manage.go b/cmd/crowdsec/win_service_manage.go index 4aa11527350..4e31dc019af 100644 --- a/cmd/crowdsec/win_service_manage.go +++ b/cmd/crowdsec/win_service_manage.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build windows +//go:build windows package main diff --git a/pkg/acquisition/modules/file/tailline.go b/pkg/acquisition/modules/file/tailline.go index ac377b6636e..0de95e4a95c 100644 --- a/pkg/acquisition/modules/file/tailline.go +++ b/pkg/acquisition/modules/file/tailline.go @@ -1,4 +1,4 @@ -// +build linux freebsd netbsd openbsd solaris !windows +//go:build !windows package fileacquisition diff --git a/pkg/acquisition/modules/file/tailline_windows.go b/pkg/acquisition/modules/file/tailline_windows.go index 0c853c6e9c2..2c382b9b342 100644 --- a/pkg/acquisition/modules/file/tailline_windows.go +++ b/pkg/acquisition/modules/file/tailline_windows.go @@ -1,4 +1,4 @@ -// +build windows +//go:build windows package fileacquisition diff --git a/pkg/acquisition/modules/wineventlog/wineventlog_test.go b/pkg/acquisition/modules/wineventlog/wineventlog_test.go index 54fddc3d8cb..20f8a58347a 100644 --- a/pkg/acquisition/modules/wineventlog/wineventlog_test.go +++ b/pkg/acquisition/modules/wineventlog/wineventlog_test.go @@ -1,5 +1,4 @@ //go:build windows -// +build windows package wineventlogacquisition diff --git a/test/ansible/vars/go.yml b/test/ansible/vars/go.yml index a735b954349..c84c8a345c2 100644 --- a/test/ansible/vars/go.yml +++ b/test/ansible/vars/go.yml @@ -1,5 +1,5 @@ # vim: set ft=yaml.ansible: --- -golang_version: "1.21.4" +golang_version: "1.21.5" golang_install_dir: "/opt/go/{{ golang_version }}"