From 79724631e3ad22e2c3a167dfa13936e4e4a6d5d0 Mon Sep 17 00:00:00 2001 From: Anton Ovchinnikov Date: Tue, 7 Feb 2023 14:22:10 +0100 Subject: [PATCH] fix(release): Bump root module version in submodules (#576) --- scripts/bump-version.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index 9f4cb4473..153eea2a5 100755 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -17,8 +17,14 @@ echo "Bumping version: $NEW_VERSION" function replace() { ! grep "$2" $3 - perl -i -pe "s/$1/$2/g" $3 + perl -i -pe "s!$1!$2!g" $3 grep "$2" $3 # verify that replacement was successful } replace "const SDKVersion = \"[\w.-]+\"" "const SDKVersion = \"$NEW_VERSION\"" ./sentry.go + +# Replace root module versions in submodules +GO_MOD_FILES=$(find . -type f -name 'go.mod' -not -path ./go.mod) +for GO_MOD in ${GO_MOD_FILES}; do + replace "github.com/getsentry/sentry-go v.*" "github.com/getsentry/sentry-go v${NEW_VERSION}" "${GO_MOD}" +done