{"action":"created","issue":{"url":"https://api.github.com/repos/fastlane/fastlane/issues/5857","repository_url":"https://api.github.com/repos/fastlane/fastlane","labels_url":"https://api.github.com/repos/fastlane/fastlane/issues/5857/labels{/name}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/5857/comments","events_url":"https://api.github.com/repos/fastlane/fastlane/issues/5857/events","html_url":"https://github.com/fastlane/fastlane/issues/5857","id":172768356,"number":5857,"title":"Need to detect if PEM created a certificate or not","user":{"login":"CareerFairPlus","id":17342716,"avatar_url":"https://avatars.githubusercontent.com/u/17342716?v=3","gravatar_id":"","url":"https://api.github.com/users/CareerFairPlus","html_url":"https://github.com/CareerFairPlus","followers_url":"https://api.github.com/users/CareerFairPlus/followers","following_url":"https://api.github.com/users/CareerFairPlus/following{/other_user}","gists_url":"https://api.github.com/users/CareerFairPlus/gists{/gist_id}","starred_url":"https://api.github.com/users/CareerFairPlus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CareerFairPlus/subscriptions","organizations_url":"https://api.github.com/users/CareerFairPlus/orgs","repos_url":"https://api.github.com/users/CareerFairPlus/repos","events_url":"https://api.github.com/users/CareerFairPlus/events{/privacy}","received_events_url":"https://api.github.com/users/CareerFairPlus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fastlane/fastlane/labels/awaiting-reply","name":"awaiting-reply","color":"bfe5bf"},{"url":"https://api.github.com/repos/fastlane/fastlane/labels/pem","name":"pem","color":"5319e7"},{"url":"https://api.github.com/repos/fastlane/fastlane/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-23T18:12:43Z","updated_at":"2016-08-24T13:26:29Z","closed_at":"2016-08-24T13:26:29Z","body":"### New Issue Checklist\r\n\r\n- [x] Updated fastlane to the latest version\r\n- [x] I have read the [Contribution Guidelines](https://github.com/fastlane/fastlane/blob/master/CONTRIBUTING.md)\r\n\r\n### Issue Description\r\nI'm trying to figure out a way to determine - programmatically in my Fastfile - if PEM created a new Push Certificate for my app or if my current certificate is still valid for a while.  I can examine the console output to see if PEM created one or not, but I can't seem to find a way to determine it in my Fastfile.  I tried to set the return value of the PEM call to something and print it out, but nothing is returned.  Anyone have any ideas?\r\n\r\n##### Complete output when running fastlane, including the stack trace and command used\r\n```\r\n$ fastlane test_pem\r\n[14:09:34]: -------------------------------------------------\r\n[14:09:34]: --- Step: Verifying required fastlane version ---\r\n[14:09:34]: -------------------------------------------------\r\n[14:09:34]: fastlane version valid\r\n[14:09:34]: ------------------------------\r\n[14:09:34]: --- Step: default_platform ---\r\n[14:09:34]: ------------------------------\r\n[14:09:34]: Driving the lane 'ios test_pem' 🚀\r\n[14:09:34]: -----------------\r\n[14:09:34]: --- Step: pem ---\r\n[14:09:34]: -----------------\r\n\r\n+------------------+---------------------------------+\r\n|               Summary for PEM 1.3.2                |\r\n+------------------+---------------------------------+\r\n| app_identifier   | [redacted]   |\r\n| username         | [redacted] |\r\n| generate_p12     | true                            |\r\n| p12_password     | [redacted]                        |\r\n| development      | false                           |\r\n| force            | false                           |\r\n| save_private_key | true                            |\r\n| output_path      | .                               |\r\n+------------------+---------------------------------+\r\n\r\n[14:09:35]: Starting login with user '[redacted]'\r\n[14:09:36]: Successfully logged in\r\n[14:09:48]: Existing push notification profile '[redacted]' is valid for 395 more days.\r\n[14:09:48]: You already have a push certificate, which is active for more than 30 more days. No need to create a new one\r\n[14:09:48]: If you still want to create a new one, use the --force option when running PEM.\r\n[14:09:48]: PEM Return Value: \r\n\r\n+------+-------------------------------------+-------------+\r\n|                     fastlane summary                     |\r\n+------+-------------------------------------+-------------+\r\n| Step | Action                              | Time (in s) |\r\n+------+-------------------------------------+-------------+\r\n| 1    | Verifying required fastlane version | 0           |\r\n| 2    | default_platform                    | 0           |\r\n| 3    | pem                                 | 13          |\r\n+------+-------------------------------------+-------------+\r\n\r\n[14:09:48]: fastlane.tools finished successfully 🎉\r\n```\r\n\r\n### Configuration Files\r\n\r\nPlease copy the complete content of your `Fastfile` and any other configuration files you use below:\r\n\r\nFastfile:\r\n```ruby\r\nlane :test_pem do\r\n    pemReturn = pem(\r\n      app_identifier: '[redacted]',\r\n      username: '[redacted]',\r\n      generate_p12: true,\r\n      p12_password: ENV['P12_PASSWORD'])\r\n    UI.message \"PEM Return Value: #{pemReturn.to_s}\"\r\n  end\r\n```\r\n\r\n### Environment\r\n\r\nfastlane version (run `fastlane -v`): 1.101.0\r\n\r\nDo you use bundler to execute fastlane (i.e. `bundle exec fastlane`)? No\r\n\r\nDo you use a Ruby environment manager (e.g. `chruby`, `rbenv`, `rvm`)? rvm\r\n"},"comment":{"url":"https://api.github.com/repos/fastlane/fastlane/issues/comments/242062574","html_url":"https://github.com/fastlane/fastlane/issues/5857#issuecomment-242062574","issue_url":"https://api.github.com/repos/fastlane/fastlane/issues/5857","id":242062574,"user":{"login":"CareerFairPlus","id":17342716,"avatar_url":"https://avatars.githubusercontent.com/u/17342716?v=3","gravatar_id":"","url":"https://api.github.com/users/CareerFairPlus","html_url":"https://github.com/CareerFairPlus","followers_url":"https://api.github.com/users/CareerFairPlus/followers","following_url":"https://api.github.com/users/CareerFairPlus/following{/other_user}","gists_url":"https://api.github.com/users/CareerFairPlus/gists{/gist_id}","starred_url":"https://api.github.com/users/CareerFairPlus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CareerFairPlus/subscriptions","organizations_url":"https://api.github.com/users/CareerFairPlus/orgs","repos_url":"https://api.github.com/users/CareerFairPlus/repos","events_url":"https://api.github.com/users/CareerFairPlus/events{/privacy}","received_events_url":"https://api.github.com/users/CareerFairPlus/received_events","type":"User","site_admin":false},"created_at":"2016-08-24T13:26:29Z","updated_at":"2016-08-24T13:26:29Z","body":"Just noticed the new_profile option in the PEM action:\r\nhttps://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md#pem\r\n"}}
{"actor":{"display_login":"CareerFairPlus"}}