-
-
Save mmiedlarz/7d5485addbade0616b4d652de2fdd641 to your computer and use it in GitHub Desktop.
Final version of Fastfile and Matchfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
platform :ios do | |
desc "Recreate provisioning profiles and certificates." | |
lane :recreate_certificates do | |
match(type: "development", force_for_new_devices: true) | |
match(type: "adhoc", force_for_new_devices: true) | |
match(type: "appstore") | |
end | |
desc "Fetch certificates and provisioning profiles from git repo" | |
lane :fetch_certificates do | |
match(type: "development", readonly: true) | |
match(type: "adhoc", readonly: true) | |
match(type: "appstore", readonly: true) | |
end | |
desc "Archives the app and upload new build to the AppCenter" | |
lane :build_adhoc do | |
cocoapods(try_repo_update_on_error: true) | |
scan( | |
workspace: "./MyProject.xcworkspace", | |
scheme: "MyScheme", | |
configuration: "Debug", | |
devices: ["iPhone X"], | |
clean: true, | |
) | |
update_build_number | |
match(type: "adhoc", readonly: true) | |
gym( | |
include_bitcode: false, | |
clean: true, | |
workspace: "./MyProject.workspace", | |
scheme: "MyScheme", | |
output_name: "MyApp.ipa", | |
export_method: "ad-hoc" | |
) | |
# Binary upload using AppCenter | |
commit = last_git_commit | |
appcenter_upload( | |
api_token: "APP_CENTER_API_TOKEN", | |
owner_name: "APP_CENTER_OWNER_NAME", | |
app_name: "APP_CENTER_APP_NAME", | |
destinations: "AppTesters", | |
file: "./MyApp.ipa", | |
release_notes: commit[:message] | |
) | |
end | |
desc "Set build number based on current time" | |
private_lane :update_build_number do | |
build_number = Time.new.strftime("%Y.%m.%d.%H%M") | |
increment_build_number( | |
build_number: build_number, | |
xcodeproj: "./MyProject.xcodeproj" | |
) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git_url("git@githosting.com:match_provisioning_repo.git") | |
storage_mode("git") | |
type("development") | |
team_id("YOUR_APPLE_TEAM_ID") | |
app_identifier(["com.your.appId1", "com.your.appId2"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment