{"action":"created","comment":{"url":"https://api.github.com/repos/Quick/Quick/pulls/comments/52096226","id":52096226,"diff_hunk":"@@ -0,0 +1,215 @@\n+class ReleaseScript\n+\n+  def self.run(version, release_notes_file_path)\n+    run_internal(version, release_notes_file_path, false)\n+  end\n+\n+  def self.run_force(version, release_notes_file_path)\n+    run_internal(version, release_notes_file_path, true)\n+  end\n+\n+  private\n+\n+  def self.run_internal(version, release_notes_file_path, force)\n+    remote_branch = 'convert_release_script_to_rake_task'\n+    pod_name = 'Quick'\n+    pod_spec = 'Quick.podspec'\n+    github_tags_url = 'https://github.com/jwfriese/Quick/tags'\n+    carthage_framework_name = 'Quick'\n+    carthage = ENV[\"CARTHAGE\"] || 'carthage'\n+    pod = ENV[\"COCOAPODS\"] || 'pod'\n+    version_tag = \"v#{version}\"\n+\n+    puts 'Verifying Local Directory for Release'\n+    carthage_available = verify_availability(carthage) \n+    die(\"Carthage is required to produce a release. Aborting.\") unless carthage_available\n+    puts ' > Carthage is installed'\n+\n+    pod_available = verify_availability(pod)\n+    die(\" Cocoapods is required to produce a release. Aborting.\") unless pod_available\n+    puts ' > Cocoapods is installed'\n+\n+    puts ' > Is this a reasonable tag?'\n+\n+    verify_version(version_tag, force)\n+\n+    release_notes = gather_release_notes(release_notes_file_path, version, pod_name)\n+    puts \" > Release notes: #{release_notes}\"\n+\n+    die(\"Cannot find podspec: #{pod_spec}. Aborting.\") unless File.file?(\"#{pod_spec}\")\n+\n+    puts ' > Podspec exists'\n+    \n+    pgp_found = system(\"git config --get user.signingkey > /dev/null\")\n+    unless pgp_found\n+      puts '[ERROR] No PGP found to sign tag. Aborting.'\n+      puts\n+      puts '  Creating a release requires signing the tag for security purposes. This allows users to verify the git cloned tree is from a trusted source.'\n+      puts '  From a security perspective, it is not considered safe to trust the commits (including Author & Signed-off fields). It is easy for any'\n+      puts '  intermediate between you and the end-users to modify the git repository.'\n+      puts\n+      puts \"  While not all users may choose to verify the PGP key for tagged releases. It is a good measure to ensure 'this is an official release'\"\n+      puts '  from the official maintainers.'\n+      puts\n+      puts \"  If you're creating your PGP key for the first time, use RSA with at least 4096 bits.\"\n+      puts\n+      puts 'Related resources:'\n+      puts ' - Configuring your system for PGP: https://git-scm.com/book/tr/v2/Git-Tools-Signing-Your-Work'\n+      puts ' - Why: http://programmers.stackexchange.com/questions/212192/what-are-the-advantages-and-disadvantages-of-cryptographically-signing-commits-a'\n+      puts\n+      return\n+    end\n+\n+    puts \" > Found PGP key for git\"\n+\n+    #verify_cocoapods_trunk_ownership(pod_name)\n+    #puts \" > Verified ownership to #{pod_name} pod\"","path":"release.rb","position":66,"original_position":66,"commit_id":"46450ab31eee4b6430690ac53eca1baa680ee2cf","original_commit_id":"46450ab31eee4b6430690ac53eca1baa680ee2cf","user":{"login":"jwfriese","id":4975322,"avatar_url":"https://avatars.githubusercontent.com/u/4975322?v=3","gravatar_id":"","url":"https://api.github.com/users/jwfriese","html_url":"https://github.com/jwfriese","followers_url":"https://api.github.com/users/jwfriese/followers","following_url":"https://api.github.com/users/jwfriese/following{/other_user}","gists_url":"https://api.github.com/users/jwfriese/gists{/gist_id}","starred_url":"https://api.github.com/users/jwfriese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwfriese/subscriptions","organizations_url":"https://api.github.com/users/jwfriese/orgs","repos_url":"https://api.github.com/users/jwfriese/repos","events_url":"https://api.github.com/users/jwfriese/events{/privacy}","received_events_url":"https://api.github.com/users/jwfriese/received_events","type":"User","site_admin":false},"body":"As noted in the leading comment, these validation steps were always failing for me because the ```pod trunk me``` command did not pass Quick back as one of my pods.  ","created_at":"2016-02-06T02:39:00Z","updated_at":"2016-02-06T02:39:00Z","html_url":"https://github.com/Quick/Quick/pull/475#discussion_r52096226","pull_request_url":"https://api.github.com/repos/Quick/Quick/pulls/475","_links":{"self":{"href":"https://api.github.com/repos/Quick/Quick/pulls/comments/52096226"},"html":{"href":"https://github.com/Quick/Quick/pull/475#discussion_r52096226"},"pull_request":{"href":"https://api.github.com/repos/Quick/Quick/pulls/475"}}},"pull_request":{"url":"https://api.github.com/repos/Quick/Quick/pulls/475","id":58508854,"html_url":"https://github.com/Quick/Quick/pull/475","diff_url":"https://github.com/Quick/Quick/pull/475.diff","patch_url":"https://github.com/Quick/Quick/pull/475.patch","issue_url":"https://api.github.com/repos/Quick/Quick/issues/475","number":475,"state":"open","locked":false,"title":"Create rake task to do releases","user":{"login":"jwfriese","id":4975322,"avatar_url":"https://avatars.githubusercontent.com/u/4975322?v=3","gravatar_id":"","url":"https://api.github.com/users/jwfriese","html_url":"https://github.com/jwfriese","followers_url":"https://api.github.com/users/jwfriese/followers","following_url":"https://api.github.com/users/jwfriese/following{/other_user}","gists_url":"https://api.github.com/users/jwfriese/gists{/gist_id}","starred_url":"https://api.github.com/users/jwfriese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwfriese/subscriptions","organizations_url":"https://api.github.com/users/jwfriese/orgs","repos_url":"https://api.github.com/users/jwfriese/repos","events_url":"https://api.github.com/users/jwfriese/events{/privacy}","received_events_url":"https://api.github.com/users/jwfriese/received_events","type":"User","site_admin":false},"body":"This is an initial step towards #467, calling for a rake task to replace the current bash script to do releases. I say \"initial step\" because, while this is a big step forward, there is still quite a bit of work to be done, and I'd like to collaborate on it. I will bring attention to the biggest points inline, but please feel free to comment on anything at all that you think could use improvement and I'll follow up quickly. \r\n\r\nAt a high level, the task as written worked to push a release build to the ```convert_release_script_to_rake_task``` branch on my personal fork, with a couple of changes:\r\n\r\n1) All the cocoapods trunk pushing code is commented out. I don't know much about how pushing to cocoapods works, but it seems as though my personal cocoapods session doesn't grant me access to update the Quick podspec. I was trying to set up the trunk stuff using this site: https://guides.cocoapods.org/making/getting-setup-with-trunk.html, which has a part about adding maintainers for a podspec. Maybe this is the problem here? \r\n\r\n2) When trying to run the Carthage build process for tvOS, I was running into the linking problems outlined in #422. I got around this by building only iOS and OSX. I'm not sure this is what we want even for the short-term. Guidance here by an experienced Quick maintainer would be much appreciated. \r\n\r\nAgain, these are the major things, but please comment on anything that sticks out to you, even if it's a basic ruby best practice.\r\n\r\n@modocache, I'd especially love to hear your feedback, as this was your request, and because this conversion will be a good chance for us to make any other changes to the release process that we feel are appropriate. \r\n\r\nThanks all, looking forward to working this out. ","created_at":"2016-02-06T02:34:40Z","updated_at":"2016-02-06T02:39:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3dce46b8eac139ad394751084e375ddacdf31bb8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Quick/Quick/pulls/475/commits","review_comments_url":"https://api.github.com/repos/Quick/Quick/pulls/475/comments","review_comment_url":"https://api.github.com/repos/Quick/Quick/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Quick/Quick/issues/475/comments","statuses_url":"https://api.github.com/repos/Quick/Quick/statuses/46450ab31eee4b6430690ac53eca1baa680ee2cf","head":{"label":"jwfriese:convert_release_script_to_rake_task","ref":"convert_release_script_to_rake_task","sha":"46450ab31eee4b6430690ac53eca1baa680ee2cf","user":{"login":"jwfriese","id":4975322,"avatar_url":"https://avatars.githubusercontent.com/u/4975322?v=3","gravatar_id":"","url":"https://api.github.com/users/jwfriese","html_url":"https://github.com/jwfriese","followers_url":"https://api.github.com/users/jwfriese/followers","following_url":"https://api.github.com/users/jwfriese/following{/other_user}","gists_url":"https://api.github.com/users/jwfriese/gists{/gist_id}","starred_url":"https://api.github.com/users/jwfriese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwfriese/subscriptions","organizations_url":"https://api.github.com/users/jwfriese/orgs","repos_url":"https://api.github.com/users/jwfriese/repos","events_url":"https://api.github.com/users/jwfriese/events{/privacy}","received_events_url":"https://api.github.com/users/jwfriese/received_events","type":"User","site_admin":false},"repo":{"id":46877936,"name":"Quick","full_name":"jwfriese/Quick","owner":{"login":"jwfriese","id":4975322,"avatar_url":"https://avatars.githubusercontent.com/u/4975322?v=3","gravatar_id":"","url":"https://api.github.com/users/jwfriese","html_url":"https://github.com/jwfriese","followers_url":"https://api.github.com/users/jwfriese/followers","following_url":"https://api.github.com/users/jwfriese/following{/other_user}","gists_url":"https://api.github.com/users/jwfriese/gists{/gist_id}","starred_url":"https://api.github.com/users/jwfriese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwfriese/subscriptions","organizations_url":"https://api.github.com/users/jwfriese/orgs","repos_url":"https://api.github.com/users/jwfriese/repos","events_url":"https://api.github.com/users/jwfriese/events{/privacy}","received_events_url":"https://api.github.com/users/jwfriese/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jwfriese/Quick","description":"The Swift (and Objective-C) testing framework.","fork":true,"url":"https://api.github.com/repos/jwfriese/Quick","forks_url":"https://api.github.com/repos/jwfriese/Quick/forks","keys_url":"https://api.github.com/repos/jwfriese/Quick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jwfriese/Quick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jwfriese/Quick/teams","hooks_url":"https://api.github.com/repos/jwfriese/Quick/hooks","issue_events_url":"https://api.github.com/repos/jwfriese/Quick/issues/events{/number}","events_url":"https://api.github.com/repos/jwfriese/Quick/events","assignees_url":"https://api.github.com/repos/jwfriese/Quick/assignees{/user}","branches_url":"https://api.github.com/repos/jwfriese/Quick/branches{/branch}","tags_url":"https://api.github.com/repos/jwfriese/Quick/tags","blobs_url":"https://api.github.com/repos/jwfriese/Quick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jwfriese/Quick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jwfriese/Quick/git/refs{/sha}","trees_url":"https://api.github.com/repos/jwfriese/Quick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jwfriese/Quick/statuses/{sha}","languages_url":"https://api.github.com/repos/jwfriese/Quick/languages","stargazers_url":"https://api.github.com/repos/jwfriese/Quick/stargazers","contributors_url":"https://api.github.com/repos/jwfriese/Quick/contributors","subscribers_url":"https://api.github.com/repos/jwfriese/Quick/subscribers","subscription_url":"https://api.github.com/repos/jwfriese/Quick/subscription","commits_url":"https://api.github.com/repos/jwfriese/Quick/commits{/sha}","git_commits_url":"https://api.github.com/repos/jwfriese/Quick/git/commits{/sha}","comments_url":"https://api.github.com/repos/jwfriese/Quick/comments{/number}","issue_comment_url":"https://api.github.com/repos/jwfriese/Quick/issues/comments{/number}","contents_url":"https://api.github.com/repos/jwfriese/Quick/contents/{+path}","compare_url":"https://api.github.com/repos/jwfriese/Quick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jwfriese/Quick/merges","archive_url":"https://api.github.com/repos/jwfriese/Quick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jwfriese/Quick/downloads","issues_url":"https://api.github.com/repos/jwfriese/Quick/issues{/number}","pulls_url":"https://api.github.com/repos/jwfriese/Quick/pulls{/number}","milestones_url":"https://api.github.com/repos/jwfriese/Quick/milestones{/number}","notifications_url":"https://api.github.com/repos/jwfriese/Quick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jwfriese/Quick/labels{/name}","releases_url":"https://api.github.com/repos/jwfriese/Quick/releases{/id}","deployments_url":"https://api.github.com/repos/jwfriese/Quick/deployments","created_at":"2015-11-25T17:57:09Z","updated_at":"2016-01-19T15:14:57Z","pushed_at":"2016-02-06T02:09:53Z","git_url":"git://github.com/jwfriese/Quick.git","ssh_url":"git@github.com:jwfriese/Quick.git","clone_url":"https://github.com/jwfriese/Quick.git","svn_url":"https://github.com/jwfriese/Quick","homepage":"","size":1582,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Quick:master","ref":"master","sha":"920b6ca2b9e6d815afcec62981e3d108b459ecbc","user":{"login":"Quick","id":8083968,"avatar_url":"https://avatars.githubusercontent.com/u/8083968?v=3","gravatar_id":"","url":"https://api.github.com/users/Quick","html_url":"https://github.com/Quick","followers_url":"https://api.github.com/users/Quick/followers","following_url":"https://api.github.com/users/Quick/following{/other_user}","gists_url":"https://api.github.com/users/Quick/gists{/gist_id}","starred_url":"https://api.github.com/users/Quick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quick/subscriptions","organizations_url":"https://api.github.com/users/Quick/orgs","repos_url":"https://api.github.com/users/Quick/repos","events_url":"https://api.github.com/users/Quick/events{/privacy}","received_events_url":"https://api.github.com/users/Quick/received_events","type":"Organization","site_admin":false},"repo":{"id":20506004,"name":"Quick","full_name":"Quick/Quick","owner":{"login":"Quick","id":8083968,"avatar_url":"https://avatars.githubusercontent.com/u/8083968?v=3","gravatar_id":"","url":"https://api.github.com/users/Quick","html_url":"https://github.com/Quick","followers_url":"https://api.github.com/users/Quick/followers","following_url":"https://api.github.com/users/Quick/following{/other_user}","gists_url":"https://api.github.com/users/Quick/gists{/gist_id}","starred_url":"https://api.github.com/users/Quick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quick/subscriptions","organizations_url":"https://api.github.com/users/Quick/orgs","repos_url":"https://api.github.com/users/Quick/repos","events_url":"https://api.github.com/users/Quick/events{/privacy}","received_events_url":"https://api.github.com/users/Quick/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Quick/Quick","description":"The Swift (and Objective-C) testing framework.","fork":false,"url":"https://api.github.com/repos/Quick/Quick","forks_url":"https://api.github.com/repos/Quick/Quick/forks","keys_url":"https://api.github.com/repos/Quick/Quick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Quick/Quick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Quick/Quick/teams","hooks_url":"https://api.github.com/repos/Quick/Quick/hooks","issue_events_url":"https://api.github.com/repos/Quick/Quick/issues/events{/number}","events_url":"https://api.github.com/repos/Quick/Quick/events","assignees_url":"https://api.github.com/repos/Quick/Quick/assignees{/user}","branches_url":"https://api.github.com/repos/Quick/Quick/branches{/branch}","tags_url":"https://api.github.com/repos/Quick/Quick/tags","blobs_url":"https://api.github.com/repos/Quick/Quick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Quick/Quick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Quick/Quick/git/refs{/sha}","trees_url":"https://api.github.com/repos/Quick/Quick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Quick/Quick/statuses/{sha}","languages_url":"https://api.github.com/repos/Quick/Quick/languages","stargazers_url":"https://api.github.com/repos/Quick/Quick/stargazers","contributors_url":"https://api.github.com/repos/Quick/Quick/contributors","subscribers_url":"https://api.github.com/repos/Quick/Quick/subscribers","subscription_url":"https://api.github.com/repos/Quick/Quick/subscription","commits_url":"https://api.github.com/repos/Quick/Quick/commits{/sha}","git_commits_url":"https://api.github.com/repos/Quick/Quick/git/commits{/sha}","comments_url":"https://api.github.com/repos/Quick/Quick/comments{/number}","issue_comment_url":"https://api.github.com/repos/Quick/Quick/issues/comments{/number}","contents_url":"https://api.github.com/repos/Quick/Quick/contents/{+path}","compare_url":"https://api.github.com/repos/Quick/Quick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Quick/Quick/merges","archive_url":"https://api.github.com/repos/Quick/Quick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Quick/Quick/downloads","issues_url":"https://api.github.com/repos/Quick/Quick/issues{/number}","pulls_url":"https://api.github.com/repos/Quick/Quick/pulls{/number}","milestones_url":"https://api.github.com/repos/Quick/Quick/milestones{/number}","notifications_url":"https://api.github.com/repos/Quick/Quick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Quick/Quick/labels{/name}","releases_url":"https://api.github.com/repos/Quick/Quick/releases{/id}","deployments_url":"https://api.github.com/repos/Quick/Quick/deployments","created_at":"2014-06-05T00:29:53Z","updated_at":"2016-02-06T00:43:21Z","pushed_at":"2016-02-06T02:34:40Z","git_url":"git://github.com/Quick/Quick.git","ssh_url":"git@github.com:Quick/Quick.git","clone_url":"https://github.com/Quick/Quick.git","svn_url":"https://github.com/Quick/Quick","homepage":"","size":2290,"stargazers_count":4062,"watchers_count":4062,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":381,"mirror_url":null,"open_issues_count":60,"forks":381,"open_issues":60,"watchers":4062,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Quick/Quick/pulls/475"},"html":{"href":"https://github.com/Quick/Quick/pull/475"},"issue":{"href":"https://api.github.com/repos/Quick/Quick/issues/475"},"comments":{"href":"https://api.github.com/repos/Quick/Quick/issues/475/comments"},"review_comments":{"href":"https://api.github.com/repos/Quick/Quick/pulls/475/comments"},"review_comment":{"href":"https://api.github.com/repos/Quick/Quick/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Quick/Quick/pulls/475/commits"},"statuses":{"href":"https://api.github.com/repos/Quick/Quick/statuses/46450ab31eee4b6430690ac53eca1baa680ee2cf"}}}}