From 6cc2b19ea7a17a4d11504b435917ac59bb95d5da Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Wed, 13 Nov 2024 23:35:33 +0700 Subject: [PATCH] wip --- _assets/scripts/upgrade_module_version.sh | 5 +++++ cmd/generate_handlers/generate_handlers_template.txt | 10 +++++----- .../server/parse-api/endpoints_template.txt | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/_assets/scripts/upgrade_module_version.sh b/_assets/scripts/upgrade_module_version.sh index b01007e83..18e6442cd 100755 --- a/_assets/scripts/upgrade_module_version.sh +++ b/_assets/scripts/upgrade_module_version.sh @@ -3,6 +3,9 @@ version=3 oldVersion=$((version - 1)) +echo "version=${version}" +echo "oldVersion=${oldVersion}" + rm extkeys/go.sum rm extkeys/go.mod rm exchanges/go.sum @@ -11,6 +14,8 @@ rm exchanges/go.mod sed -i '' "s|github.com/status-im/status-go/v${oldVersion}|github.com/status-im/status-go/v${version}|g" cmd/generate_handlers/generate_handlers_template.txt sed -i '' "s|github.com/status-im/status-go/v${oldVersion}|github.com/status-im/status-go/v${version}|g" cmd/status-backend/server/parse-api/endpoints_template.txt +#make generate + mod upgrade -tag ${version} find . -name "*.go" -exec sed -i '' "s/\/v${version}\/v${version}/\/v${version}/g" {} + \ No newline at end of file diff --git a/cmd/generate_handlers/generate_handlers_template.txt b/cmd/generate_handlers/generate_handlers_template.txt index 1f5982db8..bbed00684 100644 --- a/cmd/generate_handlers/generate_handlers_template.txt +++ b/cmd/generate_handlers/generate_handlers_template.txt @@ -5,15 +5,15 @@ package protocol import ( - "errors" + "errors" "github.com/golang/protobuf/proto" "go.uber.org/zap" - "github.com/status-im/status-go/protocol/v2/common" - "github.com/status-im/status-go/protocol/v2/protobuf" - "github.com/status-im/status-go/protocol/v2/transport" - v1protocol "github.com/status-im/status-go/v3/protocol/v1" + "github.com/status-im/status-go/v2/protocol/common" + "github.com/status-im/status-go/v2/protocol/protobuf" + "github.com/status-im/status-go/v2/protocol/transport" + v1protocol "github.com/status-im/status-go/v2/protocol/v1" ) func (m *Messenger) dispatchToHandler(messageState *ReceivedMessageState, protoBytes []byte, msg *v1protocol.StatusMessage, filter transport.Filter, fromArchive bool) error { diff --git a/cmd/status-backend/server/parse-api/endpoints_template.txt b/cmd/status-backend/server/parse-api/endpoints_template.txt index 367031372..53ea2ca56 100644 --- a/cmd/status-backend/server/parse-api/endpoints_template.txt +++ b/cmd/status-backend/server/parse-api/endpoints_template.txt @@ -3,7 +3,7 @@ package server -import statusgo "github.com/status-im/status-go/v3/mobile" +import statusgo "github.com/status-im/status-go/v2/mobile" var EndpointsWithRequest = map[string]func(string) string{ {{- range .FunctionsWithResp }}