{"action":"created","comment":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/60793726","id":60793726,"diff_hunk":"@@ -0,0 +1,31 @@\n+require 'shellwords'\n+\n+module Gym\n+  class XcodebuildFixes\n+    class << self\n+      # Determine IPAs for the Watch App which aren't inside of a containing\n+      # iOS App and removes them.\n+      #\n+      # In the future it may be nice to modify the plist file for the archive\n+      # itself so that it points to the correct IPA as well.\n+      #\n+      # This is a workaround for this bug\n+      # https://github.com/CocoaPods/CocoaPods/issues/4178\n+      def generic_archive_fix\n+        UI.verbose \"Looking For Orphaned WatchKit2 Applications\"\n+\n+        Dir.glob(\"#{BuildCommandGenerator.archive_path}/Products/Applications/*.app\").each do |app_path|\n+          if is_watchkit_ipa?(\"#{app_path}/Info.plist\")\n+            UI.verbose \"Removing Orphaned WatchKit2 Application #{app_path}\"\n+            FileUtils.rm_rf(app_path)\n+          end\n+        end\n+      end\n+\n+      # Does this application have a WatchKit target\n+      def is_watchkit_ipa?(plist_path)","path":"gym/lib/gym/xcodebuild_fixes/generic_archive_fix.rb","position":26,"original_position":26,"commit_id":"c5edb1c499b263f3bfce3df7a453d21fb2f0c167","original_commit_id":"c5edb1c499b263f3bfce3df7a453d21fb2f0c167","user":{"login":"lacostej","id":24282,"avatar_url":"https://avatars.githubusercontent.com/u/24282?v=3","gravatar_id":"","url":"https://api.github.com/users/lacostej","html_url":"https://github.com/lacostej","followers_url":"https://api.github.com/users/lacostej/followers","following_url":"https://api.github.com/users/lacostej/following{/other_user}","gists_url":"https://api.github.com/users/lacostej/gists{/gist_id}","starred_url":"https://api.github.com/users/lacostej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lacostej/subscriptions","organizations_url":"https://api.github.com/users/lacostej/orgs","repos_url":"https://api.github.com/users/lacostej/repos","events_url":"https://api.github.com/users/lacostej/events{/privacy}","received_events_url":"https://api.github.com/users/lacostej/received_events","type":"User","site_admin":false},"body":"[nitpick]\r\nname `is_watchkit_app` and pass the app path instead and resolve the Info.plist inside the method","created_at":"2016-04-22T19:50:11Z","updated_at":"2016-04-22T19:50:11Z","html_url":"https://github.com/fastlane/fastlane/pull/4325#discussion_r60793726","pull_request_url":"https://api.github.com/repos/fastlane/fastlane/pulls/4325","_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/60793726"},"html":{"href":"https://github.com/fastlane/fastlane/pull/4325#discussion_r60793726"},"pull_request":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/4325"}}},"pull_request":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/4325","id":67541388,"html_url":"https://github.com/fastlane/fastlane/pull/4325","diff_url":"https://github.com/fastlane/fastlane/pull/4325.diff","patch_url":"https://github.com/fastlane/fastlane/pull/4325.patch","issue_url":"https://api.github.com/repos/fastlane/fastlane/issues/4325","number":4325,"state":"open","locked":false,"title":"Implement workaround for generic archive bug.","user":{"login":"mfurtak","id":343134,"avatar_url":"https://avatars.githubusercontent.com/u/343134?v=3","gravatar_id":"","url":"https://api.github.com/users/mfurtak","html_url":"https://github.com/mfurtak","followers_url":"https://api.github.com/users/mfurtak/followers","following_url":"https://api.github.com/users/mfurtak/following{/other_user}","gists_url":"https://api.github.com/users/mfurtak/gists{/gist_id}","starred_url":"https://api.github.com/users/mfurtak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfurtak/subscriptions","organizations_url":"https://api.github.com/users/mfurtak/orgs","repos_url":"https://api.github.com/users/mfurtak/repos","events_url":"https://api.github.com/users/mfurtak/events{/privacy}","received_events_url":"https://api.github.com/users/mfurtak/received_events","type":"User","site_admin":false},"body":"Workaround for CocoaPods/CocoaPods#4178\r\n\r\nIn certain project configurations Xcodebuild creates a generic archive with the iOS App with Apple Watch App and the Apple Watch app in the products folder.\r\n\r\nThis is a small tweak to remove any Watch IPAs in the root of the archive (i.e not inside of a iOS App) since in pretty much all cases a developer wouldn't want / need this.\r\n\r\nHopefully this will increase the chances that gym will pick the correct IPA file when this bug occurs.","created_at":"2016-04-22T16:52:06Z","updated_at":"2016-04-22T19:50:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e655c9fc5b3b2ad76b43e43184c0c229c0cc70fd","assignee":{"login":"mfurtak","id":343134,"avatar_url":"https://avatars.githubusercontent.com/u/343134?v=3","gravatar_id":"","url":"https://api.github.com/users/mfurtak","html_url":"https://github.com/mfurtak","followers_url":"https://api.github.com/users/mfurtak/followers","following_url":"https://api.github.com/users/mfurtak/following{/other_user}","gists_url":"https://api.github.com/users/mfurtak/gists{/gist_id}","starred_url":"https://api.github.com/users/mfurtak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfurtak/subscriptions","organizations_url":"https://api.github.com/users/mfurtak/orgs","repos_url":"https://api.github.com/users/mfurtak/repos","events_url":"https://api.github.com/users/mfurtak/events{/privacy}","received_events_url":"https://api.github.com/users/mfurtak/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/fastlane/fastlane/pulls/4325/commits","review_comments_url":"https://api.github.com/repos/fastlane/fastlane/pulls/4325/comments","review_comment_url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/4325/comments","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/c5edb1c499b263f3bfce3df7a453d21fb2f0c167","head":{"label":"fastlane:generic-archives-bug","ref":"generic-archives-bug","sha":"c5edb1c499b263f3bfce3df7a453d21fb2f0c167","user":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"repo":{"id":27442967,"name":"fastlane","full_name":"fastlane/fastlane","owner":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fastlane/fastlane","description":"Connect all iOS and Android deployment tools into one streamlined workflow","fork":false,"url":"https://api.github.com/repos/fastlane/fastlane","forks_url":"https://api.github.com/repos/fastlane/fastlane/forks","keys_url":"https://api.github.com/repos/fastlane/fastlane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fastlane/fastlane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fastlane/fastlane/teams","hooks_url":"https://api.github.com/repos/fastlane/fastlane/hooks","issue_events_url":"https://api.github.com/repos/fastlane/fastlane/issues/events{/number}","events_url":"https://api.github.com/repos/fastlane/fastlane/events","assignees_url":"https://api.github.com/repos/fastlane/fastlane/assignees{/user}","branches_url":"https://api.github.com/repos/fastlane/fastlane/branches{/branch}","tags_url":"https://api.github.com/repos/fastlane/fastlane/tags","blobs_url":"https://api.github.com/repos/fastlane/fastlane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fastlane/fastlane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fastlane/fastlane/git/refs{/sha}","trees_url":"https://api.github.com/repos/fastlane/fastlane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/{sha}","languages_url":"https://api.github.com/repos/fastlane/fastlane/languages","stargazers_url":"https://api.github.com/repos/fastlane/fastlane/stargazers","contributors_url":"https://api.github.com/repos/fastlane/fastlane/contributors","subscribers_url":"https://api.github.com/repos/fastlane/fastlane/subscribers","subscription_url":"https://api.github.com/repos/fastlane/fastlane/subscription","commits_url":"https://api.github.com/repos/fastlane/fastlane/commits{/sha}","git_commits_url":"https://api.github.com/repos/fastlane/fastlane/git/commits{/sha}","comments_url":"https://api.github.com/repos/fastlane/fastlane/comments{/number}","issue_comment_url":"https://api.github.com/repos/fastlane/fastlane/issues/comments{/number}","contents_url":"https://api.github.com/repos/fastlane/fastlane/contents/{+path}","compare_url":"https://api.github.com/repos/fastlane/fastlane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fastlane/fastlane/merges","archive_url":"https://api.github.com/repos/fastlane/fastlane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fastlane/fastlane/downloads","issues_url":"https://api.github.com/repos/fastlane/fastlane/issues{/number}","pulls_url":"https://api.github.com/repos/fastlane/fastlane/pulls{/number}","milestones_url":"https://api.github.com/repos/fastlane/fastlane/milestones{/number}","notifications_url":"https://api.github.com/repos/fastlane/fastlane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fastlane/fastlane/labels{/name}","releases_url":"https://api.github.com/repos/fastlane/fastlane/releases{/id}","deployments_url":"https://api.github.com/repos/fastlane/fastlane/deployments","created_at":"2014-12-02T17:00:38Z","updated_at":"2016-04-22T16:56:56Z","pushed_at":"2016-04-22T18:01:41Z","git_url":"git://github.com/fastlane/fastlane.git","ssh_url":"git@github.com:fastlane/fastlane.git","clone_url":"https://github.com/fastlane/fastlane.git","svn_url":"https://github.com/fastlane/fastlane","homepage":"https://fastlane.tools","size":56525,"stargazers_count":7276,"watchers_count":7276,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":948,"mirror_url":null,"open_issues_count":778,"forks":948,"open_issues":778,"watchers":7276,"default_branch":"master"}},"base":{"label":"fastlane:master","ref":"master","sha":"8878d6aa9bdef94986ee92f412e8e461b479a356","user":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"repo":{"id":27442967,"name":"fastlane","full_name":"fastlane/fastlane","owner":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fastlane/fastlane","description":"Connect all iOS and Android deployment tools into one streamlined workflow","fork":false,"url":"https://api.github.com/repos/fastlane/fastlane","forks_url":"https://api.github.com/repos/fastlane/fastlane/forks","keys_url":"https://api.github.com/repos/fastlane/fastlane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fastlane/fastlane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fastlane/fastlane/teams","hooks_url":"https://api.github.com/repos/fastlane/fastlane/hooks","issue_events_url":"https://api.github.com/repos/fastlane/fastlane/issues/events{/number}","events_url":"https://api.github.com/repos/fastlane/fastlane/events","assignees_url":"https://api.github.com/repos/fastlane/fastlane/assignees{/user}","branches_url":"https://api.github.com/repos/fastlane/fastlane/branches{/branch}","tags_url":"https://api.github.com/repos/fastlane/fastlane/tags","blobs_url":"https://api.github.com/repos/fastlane/fastlane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fastlane/fastlane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fastlane/fastlane/git/refs{/sha}","trees_url":"https://api.github.com/repos/fastlane/fastlane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/{sha}","languages_url":"https://api.github.com/repos/fastlane/fastlane/languages","stargazers_url":"https://api.github.com/repos/fastlane/fastlane/stargazers","contributors_url":"https://api.github.com/repos/fastlane/fastlane/contributors","subscribers_url":"https://api.github.com/repos/fastlane/fastlane/subscribers","subscription_url":"https://api.github.com/repos/fastlane/fastlane/subscription","commits_url":"https://api.github.com/repos/fastlane/fastlane/commits{/sha}","git_commits_url":"https://api.github.com/repos/fastlane/fastlane/git/commits{/sha}","comments_url":"https://api.github.com/repos/fastlane/fastlane/comments{/number}","issue_comment_url":"https://api.github.com/repos/fastlane/fastlane/issues/comments{/number}","contents_url":"https://api.github.com/repos/fastlane/fastlane/contents/{+path}","compare_url":"https://api.github.com/repos/fastlane/fastlane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fastlane/fastlane/merges","archive_url":"https://api.github.com/repos/fastlane/fastlane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fastlane/fastlane/downloads","issues_url":"https://api.github.com/repos/fastlane/fastlane/issues{/number}","pulls_url":"https://api.github.com/repos/fastlane/fastlane/pulls{/number}","milestones_url":"https://api.github.com/repos/fastlane/fastlane/milestones{/number}","notifications_url":"https://api.github.com/repos/fastlane/fastlane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fastlane/fastlane/labels{/name}","releases_url":"https://api.github.com/repos/fastlane/fastlane/releases{/id}","deployments_url":"https://api.github.com/repos/fastlane/fastlane/deployments","created_at":"2014-12-02T17:00:38Z","updated_at":"2016-04-22T16:56:56Z","pushed_at":"2016-04-22T18:01:41Z","git_url":"git://github.com/fastlane/fastlane.git","ssh_url":"git@github.com:fastlane/fastlane.git","clone_url":"https://github.com/fastlane/fastlane.git","svn_url":"https://github.com/fastlane/fastlane","homepage":"https://fastlane.tools","size":56525,"stargazers_count":7276,"watchers_count":7276,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":948,"mirror_url":null,"open_issues_count":778,"forks":948,"open_issues":778,"watchers":7276,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/4325"},"html":{"href":"https://github.com/fastlane/fastlane/pull/4325"},"issue":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/4325"},"comments":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/4325/comments"},"review_comments":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/4325/comments"},"review_comment":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/4325/commits"},"statuses":{"href":"https://api.github.com/repos/fastlane/fastlane/statuses/c5edb1c499b263f3bfce3df7a453d21fb2f0c167"}}}}