From ad70f42289c38084ff1b7e880d19e673bea040ff Mon Sep 17 00:00:00 2001 From: Sam Steele Date: Mon, 20 Dec 2021 17:38:23 -0500 Subject: [PATCH] add Catalyst to fastlane --- .gitignore | 2 ++ IRCCloud.xcodeproj/project.pbxproj | 6 ++++ IRCCloud/IRCCloud-Info.plist | 2 ++ build-scripts/BUILD | 2 +- fastlane/Fastfile | 47 ++++++++++++++++++++++++++++++ fastlane/README.md | 13 +++++++++ 6 files changed, 71 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 90c925e15..e9546a2ef 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ Gemfile.lock Podfile.lock Pods/ .env +IRCCloud.app +IRCCloud.pkg diff --git a/IRCCloud.xcodeproj/project.pbxproj b/IRCCloud.xcodeproj/project.pbxproj index dd5dc829f..18eea7ff7 100644 --- a/IRCCloud.xcodeproj/project.pbxproj +++ b/IRCCloud.xcodeproj/project.pbxproj @@ -4558,6 +4558,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Distribution"; DEVELOPMENT_TEAM = GED45EQAGA; ENABLE_NS_ASSERTIONS = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -4589,6 +4590,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.irccloud.IRCCloud.ShareExtension; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "App Store ShareExtension"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "Catalyst ShareExtension"; SKIP_INSTALL = YES; SUPPORTS_MACCATALYST = YES; }; @@ -4687,6 +4689,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Distribution"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = GED45EQAGA; @@ -4714,6 +4717,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.irccloud.IRCCloud.NotificationService; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "App Store NotificationService"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "Catalyst NotificationService"; SKIP_INSTALL = YES; SUPPORTS_MACCATALYST = YES; }; @@ -5585,6 +5589,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = IRCCloud/IRCCloud.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Distribution"; DEVELOPMENT_TEAM = GED45EQAGA; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -5603,6 +5608,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.irccloud.${PRODUCT_NAME:rfc1034identifier}${BUNDLE_SUFFIX}"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "App Store"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "Catalyst IRCCloud"; SUPPORTS_MACCATALYST = YES; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; diff --git a/IRCCloud/IRCCloud-Info.plist b/IRCCloud/IRCCloud-Info.plist index deafdc69c..c8e4d20a5 100644 --- a/IRCCloud/IRCCloud-Info.plist +++ b/IRCCloud/IRCCloud-Info.plist @@ -65,6 +65,8 @@ GIT_VERSION ITSAppUsesNonExemptEncryption + LSApplicationCategoryType + public.app-category.social-networking LSApplicationQueriesSchemes firefox diff --git a/build-scripts/BUILD b/build-scripts/BUILD index 0947c3313..ae4ee13c0 100644 --- a/build-scripts/BUILD +++ b/build-scripts/BUILD @@ -1 +1 @@ -188 \ No newline at end of file +200 \ No newline at end of file diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 62f293679..37d4db6b0 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -181,6 +181,53 @@ platform :ios do end +platform :mac do + desc "Build and push to iTunes Connect" + lane :push do |options| + pkg = "IRCCloud.pkg" + scheme = "IRCCloud" + + # Set a build number manually if provided + # TODO pull this from the Info.plist + default_build_number = "GIT_VERSION" + if options[:build] + sh "cd .. && agvtool new-version -all #{options[:build]}" + end + + # Build a pkg + gym( + scheme: scheme, + configuration: "AppStore", + export_method: "app-store", + catalyst_platform: "macos", + skip_profile_detection: true, + export_options: { + method: "app-store", + provisioningProfiles: { + "com.irccloud.IRCCloud" => "Catalyst IRCCloud", + "com.irccloud.IRCCloud.ShareExtension" => "Catalyst ShareExtension", + "com.irccloud.IRCCloud.NotificationService" => "Catalyst NotificationService", + } + } + ) + + # Reset the build number + if options[:build] + sh "cd .. && agvtool new-version -all #{default_build_number}" + end + + # Upload to iTunes Connect + deliver( + pkg: pkg, + platform: "osx", + run_precheck_before_submit: false, + skip_metadata: true, + skip_screenshots: true + ) + end +end + + # More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md # All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md diff --git a/fastlane/README.md b/fastlane/README.md index f86ef5eff..55278f0de 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -81,6 +81,19 @@ Make sure all devices are added to the ad-hoc profile ---- + +## Mac + +### mac push + +```sh +[bundle exec] fastlane mac push +``` + +Build and push to iTunes Connect + +---- + This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).