Skip to content

Commit

Permalink
feat(sentry): enable in android lane
Browse files Browse the repository at this point in the history
  • Loading branch information
lpezzolla committed Sep 21, 2023
1 parent 99bdb35 commit 2c31575
Show file tree
Hide file tree
Showing 11 changed files with 124 additions and 124 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,19 @@ jobs:
run: printf '@polito:registry=https://npm.pkg.github.com\n//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}\n' > .npmrc
- name: Install npm dependencies
run: npm install
- name: Sentry Release
uses: getsentry/[email protected]
if: steps.configure.outputs.build_no != ''
env:
SENTRY_URL: ${{ vars.SENTRY_URL }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
with:
environment: 'production'
ignore_missing: true
dist: ${{ steps.configure.outputs.build_no }}
version: ${{ steps.configure.outputs.version }}


build-android:
Expand Down
3 changes: 3 additions & 0 deletions android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-sentry (1.15.0)
os (~> 1.1, >= 1.1.4)
fastlane-plugin-versioning_android (0.1.1)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.42.0)
Expand Down Expand Up @@ -216,6 +218,7 @@ PLATFORMS

DEPENDENCIES
fastlane
fastlane-plugin-sentry
fastlane-plugin-versioning_android

RUBY VERSION
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ buildscript {
buildToolsVersion = "33.0.0"
kotlinVersion = "1.6.0"
minSdkVersion = 21
compileSdkVersion = 32
targetSdkVersion = 32
compileSdkVersion = 33
targetSdkVersion = 33

// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
Expand Down
13 changes: 13 additions & 0 deletions android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ platform :android do
release_status: "draft",
)

source_map_path = 'app/build/generated/sourcemaps/react/release/index.android.bundle.map'
bundle_path = 'app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle'


sentry_upload_sourcemap(
auth_token: ENV['SENTRY_AUTH_TOKEN'],
org_slug: ENV['SENTRY_ORG'],
project_slug: ENV['SENTRY_PROJECT'],
version: ENV['APP_VERSION'],
build: ENV['BUILD_NO'],
sourcemap: [bundle_path, source_map_path],
rewrite: true
)
end

desc "Assemble signed Android APK"
Expand Down
3 changes: 2 additions & 1 deletion android/fastlane/Pluginfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
#
# Ensure this file is checked in to source control!

gem 'fastlane-plugin-versioning_android'
gem 'fastlane-plugin-versioning_android'
gem 'fastlane-plugin-sentry'
3 changes: 3 additions & 0 deletions ios/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-sentry (1.15.0)
os (~> 1.1, >= 1.1.4)
ffi (1.15.5)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
Expand Down Expand Up @@ -277,6 +279,7 @@ PLATFORMS
DEPENDENCIES
cocoapods (~> 1.11, >= 1.11.2)
fastlane
fastlane-plugin-sentry

RUBY VERSION
ruby 2.7.6p219
Expand Down
16 changes: 8 additions & 8 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,9 @@ PODS:
- RNScreens (3.22.0):
- React-Core
- React-RCTImage
- RNSentry (5.6.0):
- RNSentry (5.9.1):
- React-Core
- Sentry/HybridSDK (= 8.7.3)
- Sentry/HybridSDK (= 8.10.0)
- RNSVG (13.4.0):
- React-Core
- SDWebImage (5.11.1):
Expand All @@ -525,9 +525,9 @@ PODS:
- SDWebImageWebPCoder (0.8.5):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.10)
- Sentry/HybridSDK (8.7.3):
- SentryPrivate (= 8.7.3)
- SentryPrivate (8.7.3)
- Sentry/HybridSDK (8.10.0):
- SentryPrivate (= 8.10.0)
- SentryPrivate (8.10.0)
- SocketRocket (0.6.0)
- TOCropViewController (2.6.1)
- Yoga (1.14.0)
Expand Down Expand Up @@ -832,12 +832,12 @@ SPEC CHECKSUMS:
RNImageCropPicker: ffbba608264885c241cbf3a8f78eb7aeeb978241
RNKeychain: ff836453cba46938e0e9e4c22e43d43fa2c90333
RNScreens: 68fd1060f57dd1023880bf4c05d74784b5392789
RNSentry: 9f0447b3ce13806f544903748de423259ead8552
RNSentry: 0a1daa8ee81e2776f977ae8c66e67c8d85587828
RNSVG: 07dbd870b0dcdecc99b3a202fa37c8ca163caec2
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
Sentry: c7a86f43510a7d5678d4de28d78c28ab351d295b
SentryPrivate: 2eaabf598a46d4b9b8822aef766df2a84caf2e6f
Sentry: 71cd4427146ac56eab6e70401ac7a24384c3d3b5
SentryPrivate: 9334613897c85a9e30f2c9d7a331af8aaa4fe71f
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
Yoga: 5b0304b3dbef2b52e078052138e23a19c7dacaef
Expand Down
3 changes: 2 additions & 1 deletion ios/fastlane/Pluginfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!
# Ensure this file is checked in to source control!
gem 'fastlane-plugin-sentry'
Loading

0 comments on commit 2c31575

Please sign in to comment.