script comments

This commit is contained in:
Igor Sirotin 2024-11-18 07:39:44 +00:00
parent 6cc2b19ea7
commit b446a516b8
No known key found for this signature in database
GPG Key ID: 425E227CAAB81F95
1 changed files with 5 additions and 4 deletions

View File

@ -3,19 +3,20 @@
version=3 version=3
oldVersion=$((version - 1)) oldVersion=$((version - 1))
echo "version=${version}" echo "Upgrading from version ${oldVersion} to ${version}"
echo "oldVersion=${oldVersion}"
# Remove sub-modules
rm extkeys/go.sum rm extkeys/go.sum
rm extkeys/go.mod rm extkeys/go.mod
rm exchanges/go.sum rm exchanges/go.sum
rm exchanges/go.mod rm exchanges/go.mod
# Update template files
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/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 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 # Run upgrade tool
mod upgrade -tag ${version} mod upgrade -tag ${version}
# Fix "/v3/v3" bug
find . -name "*.go" -exec sed -i '' "s/\/v${version}\/v${version}/\/v${version}/g" {} + find . -name "*.go" -exec sed -i '' "s/\/v${version}\/v${version}/\/v${version}/g" {} +