From 024ea1591467b0fff8bea16cce9e54104eed3eb6 Mon Sep 17 00:00:00 2001 From: Giorgio Azzinnaro Date: Sat, 4 Jan 2025 11:21:43 +0100 Subject: [PATCH] ci: sentry full release name --- .github/workflows/build.yaml | 8 +++++--- ios/ci_scripts/ci_post_xcodebuild.sh | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e84dbbb..3977343 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -85,6 +85,10 @@ jobs: git fetch origin gh-pages:gh-pages - name: Compile web and put in gh-pages branch + env: + # This should ensure that the web build has the same settings as mobile apps to configure Sentry consistently + SENTRY_RELEASE: "is.giorgio.app.parousia@${{ steps.parse_pubspec.outputs.pubspec_version }}+${{ github.run_number }}" + SENTRY_DIST: ${{ github.run_number }} run: dart run peanut - name: Push gh-pages @@ -115,8 +119,6 @@ jobs: - name: Upload to Sentry env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - # The +1 is explicitly provided for consistency with the Xcode Cloud build: since we set SENTRY_DIST below, - # Sentry will automatically pick that as build number anyway. - SENTRY_RELEASE: "is.giorgio.app.parousia@${{ steps.parse_pubspec.outputs.pubspec_version }}" + SENTRY_RELEASE: "is.giorgio.app.parousia@${{ steps.parse_pubspec.outputs.pubspec_version }}+${{ github.run_number }}" SENTRY_DIST: ${{ github.run_number }} run: dart run sentry_dart_plugin diff --git a/ios/ci_scripts/ci_post_xcodebuild.sh b/ios/ci_scripts/ci_post_xcodebuild.sh index 1c18c85..0b1bede 100755 --- a/ios/ci_scripts/ci_post_xcodebuild.sh +++ b/ios/ci_scripts/ci_post_xcodebuild.sh @@ -13,7 +13,7 @@ export PATH="$PATH:$HOME/flutter/bin" # This command gets the version from the pubspec.yaml file - without the +1 part. # SENTRY_DIST below will be the CI_BUILD_NUMBER. # This grep command is different from the one in GitHub Actions because here we are on macOS. -SENTRY_RELEASE="is.giorgio.app.parousia@$(grep '^version:' pubspec.yaml | awk -F'[ +]' '{print $2}')" +SENTRY_RELEASE="is.giorgio.app.parousia@$(grep '^version:' pubspec.yaml | awk -F'[ +]' '{print $2 "+" $3}')" export SENTRY_RELEASE # https://docs.sentry.io/platforms/flutter/configuration/options/#dist