Skip to content

Commit

Permalink
add Catalyst to fastlane
Browse files Browse the repository at this point in the history
  • Loading branch information
c99koder committed Dec 20, 2021
1 parent e0cfb45 commit ad70f42
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ Gemfile.lock
Podfile.lock
Pods/
.env
IRCCloud.app
IRCCloud.pkg
6 changes: 6 additions & 0 deletions IRCCloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down Expand Up @@ -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;
};
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
};
Expand Down Expand Up @@ -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)",
Expand All @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions IRCCloud/IRCCloud-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
<string>GIT_VERSION</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
<string>public.app-category.social-networking</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>firefox</string>
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1 @@
188
200
47 changes: 47 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 13 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit ad70f42

Please sign in to comment.