From 71d52693286589312e76317c2de6a1f9b486a3f1 Mon Sep 17 00:00:00 2001 From: Andrii Holovko Date: Tue, 19 Nov 2024 16:35:15 +0200 Subject: [PATCH] chore(sdk): update to go 1.23 (#827) Signed-off-by: Andrii Holovko --- .github/workflows/build.yml | 18 +++++++++--------- .github/workflows/release.yml | 6 +++--- Makefile | 6 +++--- cmd/wallet-sdk-gomobile/README.md | 2 +- cmd/wallet-sdk-gomobile/go.mod | 4 ++-- go.mod | 4 +++- scripts/check_lint.sh | 2 +- test/integration/attestation/go.mod | 4 +++- test/integration/cli/go.mod | 4 ++-- test/integration/go.mod | 4 +--- test/integration/loginconsent/go.mod | 2 +- test/integration/trustregistry/go.mod | 2 +- test/integration/webhook/go.mod | 2 +- 13 files changed, 31 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a324402d..3d75d4cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ name: "wallet-sdk ci" env: - GO_VERSION: '1.22.4' + GO_VERSION: '1.23.3' on: push: @@ -98,8 +98,8 @@ jobs: - name: Build docker images for test server run: | docker build -f ./images/mocks/loginconsent/Dockerfile --no-cache -t wallet-sdk/mock-login-consent:latest \ - --build-arg GO_VER=1.22 \ - --build-arg ALPINE_VER=3.18 . + --build-arg GO_VER=1.23 \ + --build-arg ALPINE_VER=3.20 . - name: Save docker image as tar run: | docker save --output /tmp/mock-login-consent.tar wallet-sdk/mock-login-consent @@ -121,8 +121,8 @@ jobs: - name: Build docker images for test server run: | docker build -f ./images/mocks/webhook/Dockerfile --no-cache -t wallet-sdk/sample-webhook:latest \ - --build-arg GO_VER=1.22 \ - --build-arg ALPINE_VER=3.18 . + --build-arg GO_VER=1.23 \ + --build-arg ALPINE_VER=3.20 . - name: Save docker image as tar run: | docker save --output /tmp/mock-sample-webhook.tar wallet-sdk/sample-webhook @@ -144,8 +144,8 @@ jobs: - name: Build docker images for test server run: | docker build -f ./images/mocks/trustregistry/Dockerfile --no-cache -t wallet-sdk/mock-trust-registry:latest \ - --build-arg GO_VER=1.22 \ - --build-arg ALPINE_VER=3.18 . + --build-arg GO_VER=1.23 \ + --build-arg ALPINE_VER=3.20 . - name: Save docker image as tar run: | docker save --output /tmp/mock-trust-registry.tar wallet-sdk/mock-trust-registry @@ -167,8 +167,8 @@ jobs: - name: Build docker images for test server run: | docker build -f ./images/mocks/attestation/Dockerfile --no-cache -t wallet-sdk/mock-attestation:latest \ - --build-arg GO_VER=1.22 \ - --build-arg ALPINE_VER=3.18 . + --build-arg GO_VER=1.23 \ + --build-arg ALPINE_VER=3.20 . - name: Save docker image as tar run: | docker save --output /tmp/mock-attestation.tar wallet-sdk/mock-attestation diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ae5f54a..4893c0fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ name: "wallet-sdk release" env: - GO_VERSION: '1.22' + GO_VERSION: '1.23' on: push: @@ -32,7 +32,7 @@ jobs: cd .. git clone https://go.googlesource.com/go goroot cd goroot - git checkout go1.22.2 + git checkout go1.23.3 cp ../wallet-sdk/cmd/wallet-sdk-gomobile/gopatches/* ./ git apply cmd_cgo__fix_unaligned_arguments_typedmemmove_crash_on_iOS.patch cd src && ./all.bash @@ -98,7 +98,7 @@ jobs: cd .. git clone https://go.googlesource.com/go goroot cd goroot - git checkout go1.22.2 + git checkout go1.23.3 cp ../wallet-sdk/cmd/wallet-sdk-gomobile/gopatches/* ./ git apply cmd_cgo__fix_unaligned_arguments_typedmemmove_crash_on_iOS.patch cd src && ./all.bash diff --git a/Makefile b/Makefile index 560fec7b..acd8533e 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,9 @@ else PATH:=$(PATH);$(subst /,\\,$(GOBIN_PATH)) endif -ALPINE_VER ?= 3.18 -GO_ALPINE_VER ?= 3.18 -GO_VER ?= 1.22 +ALPINE_VER ?= 3.20 +GO_ALPINE_VER ?= 3.20 +GO_VER ?= 1.23 NEW_VERSION ?= $(shell git describe --tags --always `git rev-list --tags --max-count=1`)-SNAPSHOT-$(shell git rev-parse --short=7 HEAD) GIT_REV ?= $(shell git rev-parse HEAD) diff --git a/cmd/wallet-sdk-gomobile/README.md b/cmd/wallet-sdk-gomobile/README.md index 84cafafd..fbedfc25 100644 --- a/cmd/wallet-sdk-gomobile/README.md +++ b/cmd/wallet-sdk-gomobile/README.md @@ -4,7 +4,7 @@ This package contains the `gomobile`-compatible version of the SDK. It acts as a ## Prerequisites -* [Go 1.22](https://go.dev/doc/install) or newer +* [Go 1.23](https://go.dev/doc/install) or newer * The gomobile tools: ``` go install golang.org/x/mobile/cmd/gomobile@latest diff --git a/cmd/wallet-sdk-gomobile/go.mod b/cmd/wallet-sdk-gomobile/go.mod index 296ac4c3..91e1f2b7 100644 --- a/cmd/wallet-sdk-gomobile/go.mod +++ b/cmd/wallet-sdk-gomobile/go.mod @@ -5,9 +5,9 @@ module github.com/trustbloc/wallet-sdk/cmd/wallet-sdk-gomobile -go 1.22.0 +go 1.23 -toolchain go1.22.2 +toolchain go1.23.3 require ( github.com/go-jose/go-jose/v3 v3.0.1 diff --git a/go.mod b/go.mod index 3fa49ded..d1a49673 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,9 @@ module github.com/trustbloc/wallet-sdk -go 1.22 +go 1.23 + +toolchain go1.23.3 require ( github.com/PaesslerAG/jsonpath v0.1.1 diff --git a/scripts/check_lint.sh b/scripts/check_lint.sh index a00ef382..2d77fa83 100755 --- a/scripts/check_lint.sh +++ b/scripts/check_lint.sh @@ -10,7 +10,7 @@ set -e echo "Running $0" DOCKER_CMD=${DOCKER_CMD:-docker} -GOLANGCI_LINT_IMAGE="golangci/golangci-lint:v1.57.1" +GOLANGCI_LINT_IMAGE="golangci/golangci-lint:v1.62.0" if [ ! $(command -v ${DOCKER_CMD}) ]; then exit 0 diff --git a/test/integration/attestation/go.mod b/test/integration/attestation/go.mod index 7debc41b..20ef76f1 100644 --- a/test/integration/attestation/go.mod +++ b/test/integration/attestation/go.mod @@ -4,7 +4,9 @@ module github.com/trustbloc/wallet-sdk/test/integration/attestation -go 1.22 +go 1.23 + +toolchain go1.23.3 require ( github.com/google/uuid v1.3.0 diff --git a/test/integration/cli/go.mod b/test/integration/cli/go.mod index d89dc009..b09993c1 100644 --- a/test/integration/cli/go.mod +++ b/test/integration/cli/go.mod @@ -4,9 +4,9 @@ module github.com/trustbloc/wallet-sdk/test/integration/helper -go 1.22.0 +go 1.23 -toolchain go1.22.2 +toolchain go1.23.3 require github.com/trustbloc/wallet-sdk/test/integration v0.0.0-20221207181956-419a3951143f diff --git a/test/integration/go.mod b/test/integration/go.mod index 1fccbdc6..7313a554 100644 --- a/test/integration/go.mod +++ b/test/integration/go.mod @@ -5,9 +5,7 @@ module github.com/trustbloc/wallet-sdk/test/integration -go 1.22.0 - -toolchain go1.22.2 +go 1.23 require ( github.com/google/uuid v1.3.0 diff --git a/test/integration/loginconsent/go.mod b/test/integration/loginconsent/go.mod index 116a63ce..20d617c7 100644 --- a/test/integration/loginconsent/go.mod +++ b/test/integration/loginconsent/go.mod @@ -4,7 +4,7 @@ module github.com/trustbloc/vcs/test/bdd/loginconsent -go 1.22 +go 1.23 require ( github.com/google/uuid v1.3.0 diff --git a/test/integration/trustregistry/go.mod b/test/integration/trustregistry/go.mod index cc9e1ca9..dbb1ded4 100644 --- a/test/integration/trustregistry/go.mod +++ b/test/integration/trustregistry/go.mod @@ -5,7 +5,7 @@ module github.com/trustbloc/wallet-sdk/test/integration/trustregistry-mock -go 1.22.0 +go 1.23 require ( github.com/gorilla/mux v1.8.1 diff --git a/test/integration/webhook/go.mod b/test/integration/webhook/go.mod index 629a8427..e143a90f 100644 --- a/test/integration/webhook/go.mod +++ b/test/integration/webhook/go.mod @@ -4,7 +4,7 @@ module github.com/trustbloc/wallet-sdk/test/integration/webhook -go 1.22 +go 1.23 require ( github.com/gorilla/mux v1.8.0