From 0becf61b746d35558883f8907a26dc937c68df0e Mon Sep 17 00:00:00 2001 From: Rinat Enikeev Date: Tue, 23 Jan 2024 00:30:25 +0200 Subject: [PATCH] Upload dSYM using recommended way (#1889) with tools --- .github/workflows/firebase.yml | 8 -------- .github/workflows/testflight.yml | 12 ------------ Apps/RuuviStation/target.yml | 11 +++++++++++ scripts/build/upload_dsyms.sh | 3 +++ 4 files changed, 14 insertions(+), 20 deletions(-) create mode 100644 scripts/build/upload_dsyms.sh diff --git a/.github/workflows/firebase.yml b/.github/workflows/firebase.yml index f1a87f4d6..5bbd3c85d 100644 --- a/.github/workflows/firebase.yml +++ b/.github/workflows/firebase.yml @@ -105,14 +105,6 @@ jobs: --groups ${{ secrets.ALPHA_TESTERS_GROUP }} \ --release-notes "${{ steps.build_changelog.outputs.changelog }}" - - name: Zip dSYM files - run: | - find ./Build/Station_Dev.xcarchive -name '*.dSYM' | xargs -I \{\} zip -r \{\}.zip \{\} - - - name: Upload dSYM to Firebase - run: | - find ./Build/Station_Dev.xcarchive -name '*.dSYM.zip' | xargs -I \{\} ./.tools/firebase/firebase crashlytics:symbols:upload --app ${{ secrets.GOOGLE_APP_ID }} \{\} - - name: Clean up keychain and provisioning profiles if: ${{ always() }} run: | diff --git a/.github/workflows/testflight.yml b/.github/workflows/testflight.yml index b04e6468a..4e496b8e2 100644 --- a/.github/workflows/testflight.yml +++ b/.github/workflows/testflight.yml @@ -95,18 +95,6 @@ jobs: echo -n "$EXPORT_PLIST" | base64 --decode > $EXPORT_PLIST_PATH xcodebuild -exportArchive -archivePath ./Build/Station.xcarchive -exportOptionsPlist $EXPORT_PLIST_PATH -exportPath ${{ runner.temp }}/export - - name: Install firebase CLI - run: | - make installed_firebase - - - name: Zip dSYM files - run: | - find ./Build/Station.xcarchive -name '*.dSYM' | xargs -I \{\} zip -r \{\}.zip \{\} - - - name: Upload dSYM to Firebase - run: | - find ./Build/Station.xcarchive -name '*.dSYM.zip' | xargs -I \{\} ./.tools/firebase/firebase crashlytics:symbols:upload --app ${{ secrets.GOOGLE_APP_ID }} \{\} - - name: Upload to testflight run: | IPA_PATH=$RUNNER_TEMP/export/station.ipa diff --git a/Apps/RuuviStation/target.yml b/Apps/RuuviStation/target.yml index 14768790f..ccd7e3ab3 100644 --- a/Apps/RuuviStation/target.yml +++ b/Apps/RuuviStation/target.yml @@ -97,6 +97,7 @@ targets: CODE_SIGN_IDENTITY: "iPhone Distribution" PROVISIONING_PROFILE_SPECIFIER: "match AdHoc com.ruuvi.station" OTHER_LDFLAGS: -ld_classic + DEBUG_INFORMATION_FORMAT: "dwarf-with-dsym" Debug: CODE_SIGN_STYLE: Automatic OTHER_LDFLAGS: -ld_classic @@ -117,6 +118,16 @@ targets: - $(SRCROOT)/Apps/RuuviStation/Sources/Resources/Plists/GoogleService-Info.plist runOnlyWhenInstalling: true basedOnDependencyAnalysis: false + - path: ../../scripts/build/upload_dsyms.sh + name: Upload dSYMs + inputFiles: + - ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME} + - ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME} + - ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist + - $(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist + - $(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH) + runOnlyWhenInstalling: true + basedOnDependencyAnalysis: false schemes: station: build: diff --git a/scripts/build/upload_dsyms.sh b/scripts/build/upload_dsyms.sh new file mode 100644 index 000000000..e01c0a307 --- /dev/null +++ b/scripts/build/upload_dsyms.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run" \ No newline at end of file