Skip to content

Commit

Permalink
Rebuild Fastfile and delete build phase with upload crashlytics
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Bert <[email protected]>
  • Loading branch information
timbms committed Sep 19, 2024
1 parent 72260c2 commit 95b5852
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 25 deletions.
61 changes: 61 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ platform :ios do
setup_keychain
certificates

# run unit tests
unittests

increment_build

type = options[:bump]

Expand Down Expand Up @@ -164,13 +168,70 @@ 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'
)

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 <[email protected]>"'
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

Expand Down
25 changes: 0 additions & 25 deletions openHAB.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,6 @@
93F38C4C23803499001B1451 /* Embed Frameworks */,
4D6470DE2561F935007B03FC /* Embed Foundation Extensions */,
DAF0A2902C56FE9F00A14A6A /* Run swiftformat & swiftlint */,
93F8063627AE76AF0035A6B0 /* Crashlytics Run Script */,
);
buildRules = (
);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 95b5852

Please sign in to comment.