From 615860d54fff11edac9866faa0e2dc135ef7f863 Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Mon, 2 Sep 2024 10:33:52 +0200 Subject: [PATCH 1/5] update --- scripts/update-cocoa.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/update-cocoa.sh b/scripts/update-cocoa.sh index 87dab5a3..dcf8ca4e 100755 --- a/scripts/update-cocoa.sh +++ b/scripts/update-cocoa.sh @@ -4,12 +4,15 @@ cd $(dirname "$0")/../ config_file='buildSrc/src/main/java/Config.kt' podspec_file='sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec' +plugin_properties_file='sentry-kotlin-multiplatform-plugin/gradle.properties' config_content=$(cat $config_file) podspec_content=$(cat $podspec_file) +plugin_properties_content=$(cat $plugin_properties_file) config_regex='(sentryCocoaVersion *= *)"([0-9\.]+)"' podspec_regex="('Sentry', *)'([0-9\.]+)'" +plugin_properties_regex='(sentryCocoaVersion *= *)([0-9\.]+)' if ! [[ $config_content =~ $config_regex ]]; then echo "Failed to find the Cocoa version in $config_file" @@ -28,6 +31,14 @@ fi podspec_whole_match=${BASH_REMATCH[0]} podspec_var_name=${BASH_REMATCH[1]} +if ! [[ $plugin_properties_content =~ $plugin_properties_regex ]]; then + echo "Failed to find the Cocoa version in $plugin_properties_file" + exit 1 +fi + +plugin_properties_whole_match=${BASH_REMATCH[0]} +plugin_properties_var_name=${BASH_REMATCH[1]} + case $1 in get-version) # We only require to return the version number of one of the files @@ -44,6 +55,10 @@ set-version) # Update the version in the podspec file newValue="${podspec_var_name}'$2'" echo "${podspec_content/${podspec_whole_match}/$newValue}" >$podspec_file + + # Update the version in the plugin properties file + newValue="${plugin_properties_var_name}$2" + echo "${plugin_properties_content/${plugin_properties_whole_match}/$newValue}" >$plugin_properties_file ;; *) echo "Unknown argument $1" From ab4ae1aa1025b1907dc3b655f4b1d4dc322d300d Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Mon, 2 Sep 2024 13:24:18 +0200 Subject: [PATCH 2/5] dont merge --- .github/workflows/update-deps.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml index d7c3b8c7..3091c7bf 100644 --- a/.github/workflows/update-deps.yml +++ b/.github/workflows/update-deps.yml @@ -6,8 +6,6 @@ on: - cron: '0 3 * * *' # And on on every PR merge so we get the updated dependencies ASAP, and to make sure the changelog doesn't conflict.gi push: - branches: - - main jobs: cocoa: From 47f384de3746bd76b2ddc5841aaadd6ef7567ce9 Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Mon, 2 Sep 2024 13:25:41 +0200 Subject: [PATCH 3/5] change name of folder --- scripts/update-cocoa.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-cocoa.sh b/scripts/update-cocoa.sh index dcf8ca4e..2aa5b082 100755 --- a/scripts/update-cocoa.sh +++ b/scripts/update-cocoa.sh @@ -4,7 +4,7 @@ cd $(dirname "$0")/../ config_file='buildSrc/src/main/java/Config.kt' podspec_file='sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec' -plugin_properties_file='sentry-kotlin-multiplatform-plugin/gradle.properties' +plugin_properties_file='sentry-kotlin-multiplatform-gradle-plugin/gradle.properties' config_content=$(cat $config_file) podspec_content=$(cat $podspec_file) From b1fa6e343b0ed3c617c11ea5ad6792ebc1056df7 Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Mon, 2 Sep 2024 13:28:53 +0200 Subject: [PATCH 4/5] dont merge --- scripts/update-cocoa.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/update-cocoa.sh b/scripts/update-cocoa.sh index 2aa5b082..c7952963 100755 --- a/scripts/update-cocoa.sh +++ b/scripts/update-cocoa.sh @@ -38,11 +38,13 @@ fi plugin_properties_whole_match=${BASH_REMATCH[0]} plugin_properties_var_name=${BASH_REMATCH[1]} +plugin_properties_version=${BASH_REMATCH[2]} + case $1 in get-version) # We only require to return the version number of one of the files - echo ${config_version} + echo ${plugin_properties_version} ;; get-repo) echo "https://github.com/getsentry/sentry-cocoa.git" From e3dca5fca03189cb437945a9f29eb685040fc4f8 Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Mon, 2 Sep 2024 13:31:16 +0200 Subject: [PATCH 5/5] update --- .github/workflows/update-deps.yml | 2 ++ scripts/update-cocoa.sh | 4 +--- sentry-kotlin-multiplatform-gradle-plugin/gradle.properties | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml index 3091c7bf..d7c3b8c7 100644 --- a/.github/workflows/update-deps.yml +++ b/.github/workflows/update-deps.yml @@ -6,6 +6,8 @@ on: - cron: '0 3 * * *' # And on on every PR merge so we get the updated dependencies ASAP, and to make sure the changelog doesn't conflict.gi push: + branches: + - main jobs: cocoa: diff --git a/scripts/update-cocoa.sh b/scripts/update-cocoa.sh index c7952963..2aa5b082 100755 --- a/scripts/update-cocoa.sh +++ b/scripts/update-cocoa.sh @@ -38,13 +38,11 @@ fi plugin_properties_whole_match=${BASH_REMATCH[0]} plugin_properties_var_name=${BASH_REMATCH[1]} -plugin_properties_version=${BASH_REMATCH[2]} - case $1 in get-version) # We only require to return the version number of one of the files - echo ${plugin_properties_version} + echo ${config_version} ;; get-repo) echo "https://github.com/getsentry/sentry-cocoa.git" diff --git a/sentry-kotlin-multiplatform-gradle-plugin/gradle.properties b/sentry-kotlin-multiplatform-gradle-plugin/gradle.properties index a56f82b9..81d4faf7 100644 --- a/sentry-kotlin-multiplatform-gradle-plugin/gradle.properties +++ b/sentry-kotlin-multiplatform-gradle-plugin/gradle.properties @@ -2,7 +2,6 @@ id=io.sentry.kotlin.multiplatform.gradle implementationClass=io.sentry.kotlin.multiplatform.gradle.SentryPlugin versionName=0.8.0 group=io.sentry -# TODO: Update update-cocoa.sh so the cocoa version is auto updated as well sentryCocoaVersion=8.26.0 # publication pom properties