script comments
This commit is contained in:
parent
6cc2b19ea7
commit
b446a516b8
|
@ -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" {} +
|
Loading…
Reference in New Issue