build: Upgrade to Go 1.18

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
This commit is contained in:
Paulo Gomes 2022-07-06 17:07:13 +01:00
parent 86fad837d4
commit 0d3c97cc87
No known key found for this signature in database
GPG Key ID: 9995233870E99BEE
8 changed files with 11 additions and 11 deletions

View File

@ -17,7 +17,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.18.x
- name: Restore go cache
uses: actions/cache@v3
with:
@ -41,7 +41,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.18.x
- name: Run tests
run: make test
env:
@ -64,7 +64,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.18.x
- name: Restore Go cache
uses: actions/cache@v3
with:

View File

@ -97,7 +97,7 @@ If any of the above dependencies are not present on your system, the first invoc
## How to run the test suite
Prerequisites:
* Go >= 1.17
* Go >= 1.18
You can run the test suite by simply doing

View File

@ -1,5 +1,5 @@
ARG BASE_VARIANT=alpine
ARG GO_VERSION=1.17
ARG GO_VERSION=1.18
ARG XX_VERSION=1.1.0
ARG LIBGIT2_IMG=ghcr.io/fluxcd/golang-with-libgit2

View File

@ -175,8 +175,8 @@ api-docs: gen-crd-api-reference-docs ## Generate API reference documentation
$(GEN_CRD_API_REFERENCE_DOCS) -api-dir=./api/v1beta1 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/image-automation.md
tidy: ## Run go mod tidy
cd api; rm -f go.sum; go mod tidy -compat=1.17
rm -f go.sum; go mod tidy -compat=1.17
cd api; rm -f go.sum; go mod tidy -compat=1.18
rm -f go.sum; go mod tidy -compat=1.18
fmt: ## Run go fmt against code
go fmt ./...

View File

@ -1,6 +1,6 @@
module github.com/fluxcd/image-automation-controller/api
go 1.17
go 1.18
require (
github.com/fluxcd/pkg/apis/meta v0.14.2

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/fluxcd/image-automation-controller
go 1.17
go 1.18
replace github.com/fluxcd/image-automation-controller/api => ./api

View File

@ -2,7 +2,7 @@
// Replaced by oss_fuzz_build.sh.
module github.com/fluxcd/image-automation-controller/tests/fuzz
go 1.17
go 1.18
replace (
github.com/fluxcd/image-automation-controller/api => ../../api

View File

@ -77,7 +77,7 @@ SOURCE_VER=$(go list -m github.com/fluxcd/source-controller/api | awk '{print $2
REFLECTOR_VER=$(go list -m github.com/fluxcd/image-reflector-controller/api | awk '{print $2}')
go mod download
go mod tidy -go=1.16 && go mod tidy -go=1.17
go mod tidy -go=1.18
go get -d github.com/fluxcd/image-automation-controller
go get -d github.com/AdaLogics/go-fuzz-headers