From d5aa3da096a40fa8d06cb0bbb11d1d8c2f8a1c08 Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Thu, 6 Nov 2025 11:19:53 +0100 Subject: [PATCH 1/2] chore(android): Set sentry-cli version to 2.58.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- android/app/sentry-cli.properties | 1 + 1 file changed, 1 insertion(+) create mode 100644 android/app/sentry-cli.properties diff --git a/android/app/sentry-cli.properties b/android/app/sentry-cli.properties new file mode 100644 index 00000000..1218c9ff --- /dev/null +++ b/android/app/sentry-cli.properties @@ -0,0 +1 @@ +version = 2.58.0 From 1fb3ca4334ed7ad996b98aff7bc36c659deee660 Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Thu, 6 Nov 2025 12:12:04 +0100 Subject: [PATCH 2/2] chore(android): Configure sentry-cli 2.58.0 via download script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the non-functional sentry-cli.properties approach with a proper setup that downloads and configures sentry-cli 2.58.0. Changes: - Remove android/app/sentry-cli.properties (only works at plugin build time) - Add android/scripts/download-sentry-cli.sh to fetch sentry-cli 2.58.0 - Add android/sentry.properties with cli.executable path - Update gitignores to exclude downloaded CLI binary - Uncomment sentry.properties ignore (our file contains no secrets) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .gitignore | 5 +- android/.gitignore | 5 +- android/app/sentry-cli.properties | 1 - android/scripts/download-sentry-cli.sh | 72 ++++++++++++++++++++++++++ android/sentry.properties | 1 + 5 files changed, 80 insertions(+), 4 deletions(-) delete mode 100644 android/app/sentry-cli.properties create mode 100755 android/scripts/download-sentry-cli.sh create mode 100644 android/sentry.properties diff --git a/.gitignore b/.gitignore index a6dfed09..e49c4dbb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ .DS_Store .idea/ -*.iml \ No newline at end of file +*.iml + +# Sentry CLI +android/.sentry/ \ No newline at end of file diff --git a/android/.gitignore b/android/.gitignore index 9d32f871..54d11deb 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -17,5 +17,6 @@ local.properties keystore.properties .kotlin/ -# Sentry Config File -sentry.properties +# Sentry Config File (typically contains auth tokens) +# Our sentry.properties only has cli.executable path, so we commit it +# sentry.properties diff --git a/android/app/sentry-cli.properties b/android/app/sentry-cli.properties deleted file mode 100644 index 1218c9ff..00000000 --- a/android/app/sentry-cli.properties +++ /dev/null @@ -1 +0,0 @@ -version = 2.58.0 diff --git a/android/scripts/download-sentry-cli.sh b/android/scripts/download-sentry-cli.sh new file mode 100755 index 00000000..4260a3c4 --- /dev/null +++ b/android/scripts/download-sentry-cli.sh @@ -0,0 +1,72 @@ +#!/bin/bash +set -e + +VERSION="2.58.0" +REPO="https://github.com/getsentry/sentry-cli" +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +CLI_DIR="$SCRIPT_DIR/../.sentry" +CLI_PATH="$CLI_DIR/sentry-cli" + +# Create directory if it doesn't exist +mkdir -p "$CLI_DIR" + +# Detect platform +case "$(uname -s)" in + Darwin*) + PLATFORM="Darwin-universal" + ;; + Linux*) + case "$(uname -m)" in + x86_64) + PLATFORM="Linux-x86_64" + ;; + aarch64) + PLATFORM="Linux-aarch64" + ;; + i686) + PLATFORM="Linux-i686" + ;; + *) + echo "Unsupported Linux architecture: $(uname -m)" + exit 1 + ;; + esac + ;; + MINGW*|MSYS*|CYGWIN*) + PLATFORM="Windows-x86_64.exe" + CLI_PATH="$CLI_PATH.exe" + ;; + *) + echo "Unsupported operating system: $(uname -s)" + exit 1 + ;; +esac + +# Check if already downloaded +if [ -f "$CLI_PATH" ]; then + CURRENT_VERSION=$("$CLI_PATH" --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || echo "unknown") + if [ "$CURRENT_VERSION" = "$VERSION" ]; then + echo "sentry-cli $VERSION already downloaded at $CLI_PATH" + exit 0 + else + echo "Existing version ($CURRENT_VERSION) differs from target ($VERSION), re-downloading..." + rm -f "$CLI_PATH" + fi +fi + +# Download sentry-cli +DOWNLOAD_URL="$REPO/releases/download/$VERSION/sentry-cli-$PLATFORM" +echo "Downloading sentry-cli $VERSION from $DOWNLOAD_URL" +curl -L -o "$CLI_PATH" "$DOWNLOAD_URL" + +# Make executable +chmod +x "$CLI_PATH" + +# Verify +DOWNLOADED_VERSION=$("$CLI_PATH" --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1) +if [ "$DOWNLOADED_VERSION" = "$VERSION" ]; then + echo "Successfully downloaded sentry-cli $VERSION to $CLI_PATH" +else + echo "ERROR: Downloaded version ($DOWNLOADED_VERSION) does not match expected version ($VERSION)" + exit 1 +fi diff --git a/android/sentry.properties b/android/sentry.properties new file mode 100644 index 00000000..d5deb508 --- /dev/null +++ b/android/sentry.properties @@ -0,0 +1 @@ +cli.executable=.sentry/sentry-cli