From 95b585214499df61f820980f220c286f09db29d0 Mon Sep 17 00:00:00 2001 From: Tim Bert <5411131+timbms@users.noreply.github.com> Date: Thu, 19 Sep 2024 20:46:05 +0200 Subject: [PATCH] Rebuild Fastfile and delete build phase with upload crashlytics Signed-off-by: Tim Bert <5411131+timbms@users.noreply.github.com> --- fastlane/Fastfile | 61 +++++++++++++++++++++++++++++++ openHAB.xcodeproj/project.pbxproj | 25 ------------- 2 files changed, 61 insertions(+), 25 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c7026fda..68b5ae1c 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -119,6 +119,10 @@ platform :ios do setup_keychain certificates + # run unit tests + unittests + + increment_build type = options[:bump] @@ -164,6 +168,14 @@ platform :ios do disable_package_automatic_updates: true ) + upload_to_testflight( + skip_submission: options[:isfeaturebuild], + distribute_external: !options[:isfeaturebuild], + notify_external_testers: !options[:isfeaturebuild], + changelog: changelog, + groups: ['Beta Testers'] + ) + upload_symbols_to_crashlytics( gsp_path: "openHAB/GoogleService-Info.plist", binary_path: './scripts/upload-symbols' @@ -171,6 +183,55 @@ platform :ios do clean_build_artifacts + # commit to git the changes from bumping version number + commit_version_bump( + message: "committed version bump: #{version} (#{build_number})", + xcodeproj: 'openHAB.xcodeproj', + include: %w[CHANGELOG.md] + ) + if is_ci? + sh 'git commit --amend --no-edit --signoff --author="openhab-bot "' + else + sh 'git commit --amend --no-edit --signoff' + end + + # push bump commit + ensure_git_status_clean + push_to_git_remote + + # tag if not a feature build + if !options[:isfeaturebuild] + #sh 'git checkout main && git merge develop --no-ff' + add_git_tag( + message: changelog, + tag: version.to_s + ) + push_to_git_remote(tags: true) + #sh 'git checkout develop' + + if is_ci? + set_github_release( + api_bearer: ENV['FASTLANE_GITHUB_RELEASE_API_BEARER'], + repository_name: 'openhab/openhab-ios', + name: "#{type.capitalize} version #{version}", + tag_name: version.to_s, + description: changelog, + commitish: 'develop' + # upload_assets: no assets supported + ) + else + set_github_release( + api_token: ENV['GITHUB_API_TOKEN'], + repository_name: 'openhab/openhab-ios', + name: "#{type.capitalize} version #{version}", + tag_name: version.to_s, + description: changelog, + commitish: 'develop' + # upload_assets: no assets supported + ) + end + + end end diff --git a/openHAB.xcodeproj/project.pbxproj b/openHAB.xcodeproj/project.pbxproj index 9b8fbf5d..b5320190 100644 --- a/openHAB.xcodeproj/project.pbxproj +++ b/openHAB.xcodeproj/project.pbxproj @@ -1087,7 +1087,6 @@ 93F38C4C23803499001B1451 /* Embed Frameworks */, 4D6470DE2561F935007B03FC /* Embed Foundation Extensions */, DAF0A2902C56FE9F00A14A6A /* Run swiftformat & swiftlint */, - 93F8063627AE76AF0035A6B0 /* Crashlytics Run Script */, ); buildRules = ( ); @@ -1280,30 +1279,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 93F8063627AE76AF0035A6B0 /* Crashlytics Run Script */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${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)", - ); - name = "Crashlytics Run Script"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "${BUILD_DIR%Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run\n"; - }; DAF0A2902C56FE9F00A14A6A /* Run swiftformat & swiftlint */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647;