Created
April 27, 2016 14:29
-
-
Save yeradis/a5191ffdcf0a19deea913c5b117b9565 to your computer and use it in GitHub Desktop.
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
desc "Responsible for Generating APNs iOS Certificates and p12p" | |
private_lane :generate_apns do |options| | |
app_id= CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) | |
pem_name = options[:pem_name]; | |
scheme = (options[:development] ? "Development" : "Production") | |
pem( | |
development: options[:development], | |
force: options[:force], | |
app_identifier: app_id, | |
generate_p12: true, | |
p12_password: ENV["P12_PASSWORD"], | |
save_private_key: true, | |
output_path: ENV["PEM_OUTPUT_PATH"], | |
pem_name: options[:pem_name], | |
new_profile: proc do |certificates| | |
puts ENV["PEM_OUTPUT_PATH"] | |
# insert the code to upload the PEM file to the server | |
end | |
) | |
toast( | |
message:"Done! Please upload the #{pem_name}.p12 file to the server for: #{app_id} - (#{scheme})", | |
) | |
end | |
lane :dev_pro_push do | |
generate_apns(development:true,force:true,pem_name:ENV["PEM_FILE_NAME_DEV_PRO"]) | |
end | |
lane :dev_free_push do | |
generate_apns(development:true,force:true,pem_name:ENV["PEM_FILE_NAME_DEV_FREE"]) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment