From 8d7ed8cbf2f72d6b86001fe8f4c9f67e35afd79a Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Fri, 28 Nov 2025 10:13:16 +0100 Subject: [PATCH 1/2] fix(apple): Change fastlane sentry_cli to sentry_debug_files_upload --- src/apple/fastlane.ts | 6 +++++- src/apple/templates.ts | 2 +- test/apple/fastfile.test.ts | 16 ++++++++-------- test/apple/templates.test.ts | 2 +- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/apple/fastlane.ts b/src/apple/fastlane.ts index f523d3091..c32910d24 100644 --- a/src/apple/fastlane.ts +++ b/src/apple/fastlane.ts @@ -79,11 +79,15 @@ function addSentryToLane( project: string, ): string { const laneContent = content.slice(lane.index, lane.index + lane.length); - const sentryCLIMatch = /sentry_cli\s*\([^)]+\)/gim.exec(laneContent); + const sentryCLIMatch = /(\n\s+)sentry_debug_files_upload\s*\([^)]+\)/gim.exec( + laneContent, + ); if (sentryCLIMatch) { // Sentry already added to lane. Update it. + // sentryCLIMatch[1] contains the leading newline and whitespace return ( content.slice(0, sentryCLIMatch.index + lane.index) + + sentryCLIMatch[1] + templates.getFastlaneSnippet(org, project).trim() + content.slice( sentryCLIMatch.index + sentryCLIMatch[0].length + lane.index, diff --git a/src/apple/templates.ts b/src/apple/templates.ts index 21ae6c629..7c22e5b58 100644 --- a/src/apple/templates.ts +++ b/src/apple/templates.ts @@ -106,7 +106,7 @@ export function getObjcSnippet(dsn: string, enableLogs: boolean): string { } export function getFastlaneSnippet(org: string, project: string): string { - return ` sentry_cli( + return ` sentry_debug_files_upload( org_slug: '${org}', project_slug: '${project}', include_sources: true diff --git a/test/apple/fastfile.test.ts b/test/apple/fastfile.test.ts index 05d27939f..5fea29f89 100644 --- a/test/apple/fastfile.test.ts +++ b/test/apple/fastfile.test.ts @@ -267,7 +267,7 @@ end }); describe('#addSentryToLane', () => { - describe('sentry_cli is not present', () => { + describe('sentry_debug_files_upload is not present', () => { it('should return original content', () => { // -- Arrange -- const content = ` @@ -293,7 +293,7 @@ platform :ios do lane :test do puts 'Hello, world!' - sentry_cli( + sentry_debug_files_upload( org_slug: 'test-org', project_slug: 'test-project', include_sources: true @@ -304,7 +304,7 @@ end }); }); - describe('sentry_cli is present', () => { + describe('sentry_debug_files_upload is present', () => { it('should return updated content', () => { // -- Arrange -- const content = ` @@ -312,11 +312,11 @@ platform :ios do lane :test do puts 'Hello, world!' - sentry_cli(org_slug: 'test-org', project_slug: 'test-project') + sentry_debug_files_upload(org_slug: 'test-org', project_slug: 'test-project') end end `; - const lane = { index: 34, length: 92, name: 'test' }; + const lane = { index: 34, length: 108, name: 'test' }; // -- Act -- const result = exportForTesting.addSentryToLane( @@ -333,7 +333,7 @@ platform :ios do lane :test do puts 'Hello, world!' - sentry_cli( + sentry_debug_files_upload( org_slug: 'test-org', project_slug: 'test-project', include_sources: true @@ -446,7 +446,7 @@ platform :ios do lane :test do puts 'Hello, world!' - sentry_cli( + sentry_debug_files_upload( org_slug: 'test-org', project_slug: 'test-project', include_sources: true @@ -518,7 +518,7 @@ end lane :beta do puts 'Beta lane' - sentry_cli( + sentry_debug_files_upload( org_slug: 'test-org', project_slug: 'test-project', include_sources: true diff --git a/test/apple/templates.test.ts b/test/apple/templates.test.ts index ab5bffdf5..d496d604a 100644 --- a/test/apple/templates.test.ts +++ b/test/apple/templates.test.ts @@ -267,7 +267,7 @@ fi // -- Assert -- expect(snippet).toBe( - ` sentry_cli( + ` sentry_debug_files_upload( org_slug: 'test-org', project_slug: 'test-project', include_sources: true From 84ee6f7779febb875c632347007b1856cd94858f Mon Sep 17 00:00:00 2001 From: Philip Niedertscheider Date: Fri, 28 Nov 2025 10:21:10 +0100 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0805a8f15..614c14d7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Fixes + +- Change fastlane injection to `sentry_debug_files_upload` instead of `sentry_cli` ([#1125](https://github.com/getsentry/sentry-wizard/pull/1125)) + ## 6.8.0 ### Features