Skip to content

Commit

Permalink
fix(release): Bump root module version in submodules (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyo authored Feb 7, 2023
1 parent 612c167 commit 7972463
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/bump-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7972463

Please # to comment.