@@ -4,12 +4,15 @@ cd $(dirname "$0")/../
44
55config_file=' buildSrc/src/main/java/Config.kt'
66podspec_file=' sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec'
7+ plugin_properties_file=' sentry-kotlin-multiplatform-gradle-plugin/gradle.properties'
78
89config_content=$( cat $config_file )
910podspec_content=$( cat $podspec_file )
11+ plugin_properties_content=$( cat $plugin_properties_file )
1012
1113config_regex=' (sentryCocoaVersion *= *)"([0-9\.]+)"'
1214podspec_regex=" ('Sentry', *)'([0-9\.]+)'"
15+ plugin_properties_regex=' (sentryCocoaVersion *= *)([0-9\.]+)'
1316
1417if ! [[ $config_content =~ $config_regex ]]; then
1518 echo " Failed to find the Cocoa version in $config_file "
2831podspec_whole_match=${BASH_REMATCH[0]}
2932podspec_var_name=${BASH_REMATCH[1]}
3033
34+ if ! [[ $plugin_properties_content =~ $plugin_properties_regex ]]; then
35+ echo " Failed to find the Cocoa version in $plugin_properties_file "
36+ exit 1
37+ fi
38+
39+ plugin_properties_whole_match=${BASH_REMATCH[0]}
40+ plugin_properties_var_name=${BASH_REMATCH[1]}
41+
3142case $1 in
3243get-version)
3344 # We only require to return the version number of one of the files
@@ -44,6 +55,10 @@ set-version)
4455 # Update the version in the podspec file
4556 newValue=" ${podspec_var_name} '$2 '"
4657 echo " ${podspec_content/ ${podspec_whole_match} / $newValue } " > $podspec_file
58+
59+ # Update the version in the plugin properties file
60+ newValue=" ${plugin_properties_var_name} $2 "
61+ echo " ${plugin_properties_content/ ${plugin_properties_whole_match} / $newValue } " > $plugin_properties_file
4762 ;;
4863* )
4964 echo " Unknown argument $1 "
0 commit comments