From 0794cd3572366e42505093d036f67aeba5dc0571 Mon Sep 17 00:00:00 2001 From: lucas Date: Thu, 12 Mar 2026 10:43:43 +0000 Subject: [PATCH 1/2] unify stub update with android update --- .github/workflows/update-deps.yml | 9 --------- scripts/update-android-stubs.sh | 4 ++++ scripts/update-android.sh | 3 +++ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml index ec4199a2fd..abec742655 100644 --- a/.github/workflows/update-deps.yml +++ b/.github/workflows/update-deps.yml @@ -19,15 +19,6 @@ jobs: name: Android SDK ssh-key: ${{ secrets.CI_DEPLOY_KEY }} - android-stubs: - runs-on: ubuntu-latest - steps: - - uses: getsentry/github-workflows/updater@v3 - with: - path: scripts/update-android-stubs.sh - name: Android SDK Stubs - ssh-key: ${{ secrets.CI_DEPLOY_KEY }} - cocoa: runs-on: ubuntu-latest steps: diff --git a/scripts/update-android-stubs.sh b/scripts/update-android-stubs.sh index f36ec335dc..f8055fbf2f 100755 --- a/scripts/update-android-stubs.sh +++ b/scripts/update-android-stubs.sh @@ -20,6 +20,10 @@ get-repo) set-version) newValue="${BASH_REMATCH[1]}$2" echo "${content/${BASH_REMATCH[0]}/$newValue}" >$file + + # Rebuild the stubs jar and JS types + cd .. + yarn build:replay-stubs || true ;; *) echo "Unknown argument $1" diff --git a/scripts/update-android.sh b/scripts/update-android.sh index e640568681..79ca835031 100755 --- a/scripts/update-android.sh +++ b/scripts/update-android.sh @@ -25,6 +25,9 @@ set-version) # Update sentry-spotlight newContent=$(echo "$newContent" | sed -E "s/(io\.sentry:sentry-spotlight:)([0-9\.]+)/\1$2/g") echo "$newContent" >$file + + # Update replay-stubs to match + $(dirname "$0")/update-android-stubs.sh set-version $2 ;; *) echo "Unknown argument $1" From b221a5f055d0bd97a2f914925b5aca3e764533ba Mon Sep 17 00:00:00 2001 From: lucas Date: Thu, 12 Mar 2026 11:08:45 +0000 Subject: [PATCH 2/2] save/restore original path --- scripts/update-android.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/update-android.sh b/scripts/update-android.sh index 79ca835031..990f3db956 100755 --- a/scripts/update-android.sh +++ b/scripts/update-android.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash set -euo pipefail +ORIGINAL_DIR=$(cd "$(dirname "$0")" && pwd) cd $(dirname "$0")/../packages/core/android file='build.gradle' content=$(cat $file) @@ -27,7 +28,8 @@ set-version) echo "$newContent" >$file # Update replay-stubs to match - $(dirname "$0")/update-android-stubs.sh set-version $2 + cd $ORIGINAL_DIR + ./update-android-stubs.sh set-version $2 ;; *) echo "Unknown argument $1"