{"action":"created","comment":{"url":"https://api.github.com/repos/openzipkin/zipkin/pulls/comments/36232140","id":36232140,"diff_hunk":"@@ -0,0 +1,80 @@\n+#!/bin/bash\n+\n+echo \"********************************\"\n+echo \"***** Publishing Artifacts *****\"\n+echo \"********************************\"\n+\n+declare -r PUBLISH_USING_JDK=\"oraclejdk7\"\n+\n+function publish_release(){\n+  if [ \"${TRAVIS_TAG}\" == \"\" ]; then\n+    echo \"[Publishing] snapshot release\"\n+    return 1\n+  else\n+    echo \"[Publishing] tag: ${TRAVIS_TAG}\"\n+    return 0\n+  fi\n+}\n+\n+function check_is_pull_request(){\n+  if [ \"${TRAVIS_PULL_REQUEST}\" == \"true\" ]; then\n+    echo \"[Not Publishing] this is a Pull Request\"\n+    exit 1\n+  else\n+    echo \"[Publishing] this is not a Pull Request\"\n+  fi\n+}\n+\n+function check_tag_valid(){\n+  #Weird comparison comparing branch to tag because when you 'git push --tags'\n+  #the branch somehow becomes the tag value\n+  #github issue: https://github.com/travis-ci/travis-ci/issues/1675\n+  if [ \"${TRAVIS_BRANCH}\" != \"${TRAVIS_TAG}\" ]; then\n+    echo \"[Not Publishing] Travis branch does not equal Travis tag, which it should: \"\n+    echo \"[Not Publishing]   github issue: https://github.com/travis-ci/travis-ci/issues/1675\"\n+    exit 1\n+  else\n+    echo \"[Publishing] Branch (${TRAVIS_BRANCH}) same as Tag (${TRAVIS_TAG})\"\n+  fi\n+}\n+\n+function check_jdk_version(){\n+  if [ \"${TRAVIS_JDK_VERSION}\" != \"${PUBLISH_USING_JDK}\" ]; then\n+    echo \"[Not Publishing] Current JDK(${TRAVIS_JDK_VERSION}) does not\"\n+    echo \"[Not Publishing]   equal PUBLISH_USING_JDK(${PUBLISH_USING_JDK})\"\n+    exit 1\n+  else\n+    echo \"[Publishing] Current JDK is the same as PUBLISH_USING_JDK\"\n+    echo \"[Publishing]   environment variable (${TRAVIS_JDK_VERSION})\"\n+  fi\n+}\n+\n+function publish_snapshots_to_bintray(){\n+  echo \"[Publishing] Starting Snapshot Publish...\" &&\n+  ./gradlew build -x test","path":"travis/publish.sh","position":54,"original_position":54,"commit_id":"d21c1e4cf50cb3a92e49c3948ba292820d90e88c","original_commit_id":"d21c1e4cf50cb3a92e49c3948ba292820d90e88c","user":{"login":"abesto","id":59982,"avatar_url":"https://avatars.githubusercontent.com/u/59982?v=3","gravatar_id":"","url":"https://api.github.com/users/abesto","html_url":"https://github.com/abesto","followers_url":"https://api.github.com/users/abesto/followers","following_url":"https://api.github.com/users/abesto/following{/other_user}","gists_url":"https://api.github.com/users/abesto/gists{/gist_id}","starred_url":"https://api.github.com/users/abesto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abesto/subscriptions","organizations_url":"https://api.github.com/users/abesto/orgs","repos_url":"https://api.github.com/users/abesto/repos","events_url":"https://api.github.com/users/abesto/events{/privacy}","received_events_url":"https://api.github.com/users/abesto/received_events","type":"User","site_admin":false},"body":"Why do we need a `build` here? By this time that should be done, and if not, `bintrayUpload` should pull it in, non?","created_at":"2015-08-04T19:41:14Z","updated_at":"2015-08-04T19:41:14Z","html_url":"https://github.com/openzipkin/zipkin/pull/541#discussion_r36232140","pull_request_url":"https://api.github.com/repos/openzipkin/zipkin/pulls/541","_links":{"self":{"href":"https://api.github.com/repos/openzipkin/zipkin/pulls/comments/36232140"},"html":{"href":"https://github.com/openzipkin/zipkin/pull/541#discussion_r36232140"},"pull_request":{"href":"https://api.github.com/repos/openzipkin/zipkin/pulls/541"}}},"pull_request":{"url":"https://api.github.com/repos/openzipkin/zipkin/pulls/541","id":41595621,"html_url":"https://github.com/openzipkin/zipkin/pull/541","diff_url":"https://github.com/openzipkin/zipkin/pull/541.diff","patch_url":"https://github.com/openzipkin/zipkin/pull/541.patch","issue_url":"https://api.github.com/repos/openzipkin/zipkin/issues/541","number":541,"state":"open","locked":false,"title":"Publish to bintray","user":{"login":"jamescway","id":473680,"avatar_url":"https://avatars.githubusercontent.com/u/473680?v=3","gravatar_id":"","url":"https://api.github.com/users/jamescway","html_url":"https://github.com/jamescway","followers_url":"https://api.github.com/users/jamescway/followers","following_url":"https://api.github.com/users/jamescway/following{/other_user}","gists_url":"https://api.github.com/users/jamescway/gists{/gist_id}","starred_url":"https://api.github.com/users/jamescway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamescway/subscriptions","organizations_url":"https://api.github.com/users/jamescway/orgs","repos_url":"https://api.github.com/users/jamescway/repos","events_url":"https://api.github.com/users/jamescway/events{/privacy}","received_events_url":"https://api.github.com/users/jamescway/received_events","type":"User","site_admin":false},"body":"## Need Sanity Check Plz, do not merge\r\n\r\n### Problem\r\n\r\nWe need to release artifacts built in travis to Bintray openzipkin/zipkin repo.  Pushing to master should trigger a snapshot release, pushing with a tag (i.e. version) would trigger a release.\r\n\r\n### Solution\r\n\r\nHow it works\r\n\r\n* user creates a tag git tag v1.2.3\r\n* then does git push origin master --tags\r\n* triggers the publish script to be called after travis build is successful\r\n\r\n* based on encrypted values in travis.yml\r\n  * gem install travis\r\n  * travis encrypt BINTRAY_API_KEY=<Bintray API key>--add\r\n  * also BINTRAY_USER, GH_USER_EMAIL, GH_USER, GH_TOKEN\r\n\r\n### Issues\r\n* not detecting if the tagged branch is master due to bug in travis (travis-ci/travis-ci#1675)\r\n* building from oraclejdk7\r\n* tagged release number over-writing gradle.properties version.  Erasing snapshot word and incrementing the number to next release\r\n* post commit tag from plugin pushing to master from travis (looks a little ugly)\r\n* release commit messages seemingly trigger snapshot releases\r\n\r\n### workarounds\r\n* gradle bintrayUpload on main project is overridden to do nothing\r\n* change git url to https instead of git://\r\n* add git user to travis to allow pushing release commit msg from travis\r\n","created_at":"2015-08-04T17:31:59Z","updated_at":"2015-08-04T19:41:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba9b1aea90de2c6bca753ddcc1e0cbb1cb81bb12","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openzipkin/zipkin/pulls/541/commits","review_comments_url":"https://api.github.com/repos/openzipkin/zipkin/pulls/541/comments","review_comment_url":"https://api.github.com/repos/openzipkin/zipkin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openzipkin/zipkin/issues/541/comments","statuses_url":"https://api.github.com/repos/openzipkin/zipkin/statuses/d21c1e4cf50cb3a92e49c3948ba292820d90e88c","head":{"label":"jamescway:gradle-bintray2","ref":"gradle-bintray2","sha":"d21c1e4cf50cb3a92e49c3948ba292820d90e88c","user":{"login":"jamescway","id":473680,"avatar_url":"https://avatars.githubusercontent.com/u/473680?v=3","gravatar_id":"","url":"https://api.github.com/users/jamescway","html_url":"https://github.com/jamescway","followers_url":"https://api.github.com/users/jamescway/followers","following_url":"https://api.github.com/users/jamescway/following{/other_user}","gists_url":"https://api.github.com/users/jamescway/gists{/gist_id}","starred_url":"https://api.github.com/users/jamescway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamescway/subscriptions","organizations_url":"https://api.github.com/users/jamescway/orgs","repos_url":"https://api.github.com/users/jamescway/repos","events_url":"https://api.github.com/users/jamescway/events{/privacy}","received_events_url":"https://api.github.com/users/jamescway/received_events","type":"User","site_admin":false},"repo":{"id":39158486,"name":"zipkin","full_name":"jamescway/zipkin","owner":{"login":"jamescway","id":473680,"avatar_url":"https://avatars.githubusercontent.com/u/473680?v=3","gravatar_id":"","url":"https://api.github.com/users/jamescway","html_url":"https://github.com/jamescway","followers_url":"https://api.github.com/users/jamescway/followers","following_url":"https://api.github.com/users/jamescway/following{/other_user}","gists_url":"https://api.github.com/users/jamescway/gists{/gist_id}","starred_url":"https://api.github.com/users/jamescway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamescway/subscriptions","organizations_url":"https://api.github.com/users/jamescway/orgs","repos_url":"https://api.github.com/users/jamescway/repos","events_url":"https://api.github.com/users/jamescway/events{/privacy}","received_events_url":"https://api.github.com/users/jamescway/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamescway/zipkin","description":"Zipkin is a distributed tracing system","fork":true,"url":"https://api.github.com/repos/jamescway/zipkin","forks_url":"https://api.github.com/repos/jamescway/zipkin/forks","keys_url":"https://api.github.com/repos/jamescway/zipkin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamescway/zipkin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamescway/zipkin/teams","hooks_url":"https://api.github.com/repos/jamescway/zipkin/hooks","issue_events_url":"https://api.github.com/repos/jamescway/zipkin/issues/events{/number}","events_url":"https://api.github.com/repos/jamescway/zipkin/events","assignees_url":"https://api.github.com/repos/jamescway/zipkin/assignees{/user}","branches_url":"https://api.github.com/repos/jamescway/zipkin/branches{/branch}","tags_url":"https://api.github.com/repos/jamescway/zipkin/tags","blobs_url":"https://api.github.com/repos/jamescway/zipkin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamescway/zipkin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamescway/zipkin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamescway/zipkin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamescway/zipkin/statuses/{sha}","languages_url":"https://api.github.com/repos/jamescway/zipkin/languages","stargazers_url":"https://api.github.com/repos/jamescway/zipkin/stargazers","contributors_url":"https://api.github.com/repos/jamescway/zipkin/contributors","subscribers_url":"https://api.github.com/repos/jamescway/zipkin/subscribers","subscription_url":"https://api.github.com/repos/jamescway/zipkin/subscription","commits_url":"https://api.github.com/repos/jamescway/zipkin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamescway/zipkin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamescway/zipkin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamescway/zipkin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamescway/zipkin/contents/{+path}","compare_url":"https://api.github.com/repos/jamescway/zipkin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamescway/zipkin/merges","archive_url":"https://api.github.com/repos/jamescway/zipkin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamescway/zipkin/downloads","issues_url":"https://api.github.com/repos/jamescway/zipkin/issues{/number}","pulls_url":"https://api.github.com/repos/jamescway/zipkin/pulls{/number}","milestones_url":"https://api.github.com/repos/jamescway/zipkin/milestones{/number}","notifications_url":"https://api.github.com/repos/jamescway/zipkin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamescway/zipkin/labels{/name}","releases_url":"https://api.github.com/repos/jamescway/zipkin/releases{/id}","created_at":"2015-07-15T20:05:49Z","updated_at":"2015-07-15T20:05:50Z","pushed_at":"2015-08-04T17:24:05Z","git_url":"git://github.com/jamescway/zipkin.git","ssh_url":"git@github.com:jamescway/zipkin.git","clone_url":"https://github.com/jamescway/zipkin.git","svn_url":"https://github.com/jamescway/zipkin","homepage":"http://twitter.github.io/zipkin","size":5107,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openzipkin:master","ref":"master","sha":"e57ff8ecd84dac253a7d80e9127d58c9256220b6","user":{"login":"openzipkin","id":11860887,"avatar_url":"https://avatars.githubusercontent.com/u/11860887?v=3","gravatar_id":"","url":"https://api.github.com/users/openzipkin","html_url":"https://github.com/openzipkin","followers_url":"https://api.github.com/users/openzipkin/followers","following_url":"https://api.github.com/users/openzipkin/following{/other_user}","gists_url":"https://api.github.com/users/openzipkin/gists{/gist_id}","starred_url":"https://api.github.com/users/openzipkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openzipkin/subscriptions","organizations_url":"https://api.github.com/users/openzipkin/orgs","repos_url":"https://api.github.com/users/openzipkin/repos","events_url":"https://api.github.com/users/openzipkin/events{/privacy}","received_events_url":"https://api.github.com/users/openzipkin/received_events","type":"Organization","site_admin":false},"repo":{"id":4576305,"name":"zipkin","full_name":"openzipkin/zipkin","owner":{"login":"openzipkin","id":11860887,"avatar_url":"https://avatars.githubusercontent.com/u/11860887?v=3","gravatar_id":"","url":"https://api.github.com/users/openzipkin","html_url":"https://github.com/openzipkin","followers_url":"https://api.github.com/users/openzipkin/followers","following_url":"https://api.github.com/users/openzipkin/following{/other_user}","gists_url":"https://api.github.com/users/openzipkin/gists{/gist_id}","starred_url":"https://api.github.com/users/openzipkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openzipkin/subscriptions","organizations_url":"https://api.github.com/users/openzipkin/orgs","repos_url":"https://api.github.com/users/openzipkin/repos","events_url":"https://api.github.com/users/openzipkin/events{/privacy}","received_events_url":"https://api.github.com/users/openzipkin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openzipkin/zipkin","description":"Zipkin is a distributed tracing system","fork":false,"url":"https://api.github.com/repos/openzipkin/zipkin","forks_url":"https://api.github.com/repos/openzipkin/zipkin/forks","keys_url":"https://api.github.com/repos/openzipkin/zipkin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openzipkin/zipkin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openzipkin/zipkin/teams","hooks_url":"https://api.github.com/repos/openzipkin/zipkin/hooks","issue_events_url":"https://api.github.com/repos/openzipkin/zipkin/issues/events{/number}","events_url":"https://api.github.com/repos/openzipkin/zipkin/events","assignees_url":"https://api.github.com/repos/openzipkin/zipkin/assignees{/user}","branches_url":"https://api.github.com/repos/openzipkin/zipkin/branches{/branch}","tags_url":"https://api.github.com/repos/openzipkin/zipkin/tags","blobs_url":"https://api.github.com/repos/openzipkin/zipkin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openzipkin/zipkin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openzipkin/zipkin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openzipkin/zipkin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openzipkin/zipkin/statuses/{sha}","languages_url":"https://api.github.com/repos/openzipkin/zipkin/languages","stargazers_url":"https://api.github.com/repos/openzipkin/zipkin/stargazers","contributors_url":"https://api.github.com/repos/openzipkin/zipkin/contributors","subscribers_url":"https://api.github.com/repos/openzipkin/zipkin/subscribers","subscription_url":"https://api.github.com/repos/openzipkin/zipkin/subscription","commits_url":"https://api.github.com/repos/openzipkin/zipkin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openzipkin/zipkin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openzipkin/zipkin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openzipkin/zipkin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openzipkin/zipkin/contents/{+path}","compare_url":"https://api.github.com/repos/openzipkin/zipkin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openzipkin/zipkin/merges","archive_url":"https://api.github.com/repos/openzipkin/zipkin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openzipkin/zipkin/downloads","issues_url":"https://api.github.com/repos/openzipkin/zipkin/issues{/number}","pulls_url":"https://api.github.com/repos/openzipkin/zipkin/pulls{/number}","milestones_url":"https://api.github.com/repos/openzipkin/zipkin/milestones{/number}","notifications_url":"https://api.github.com/repos/openzipkin/zipkin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openzipkin/zipkin/labels{/name}","releases_url":"https://api.github.com/repos/openzipkin/zipkin/releases{/id}","created_at":"2012-06-06T18:26:16Z","updated_at":"2015-08-04T11:58:31Z","pushed_at":"2015-08-04T19:02:38Z","git_url":"git://github.com/openzipkin/zipkin.git","ssh_url":"git@github.com:openzipkin/zipkin.git","clone_url":"https://github.com/openzipkin/zipkin.git","svn_url":"https://github.com/openzipkin/zipkin","homepage":"http://openzipkin.github.io/zipkin","size":11324,"stargazers_count":2544,"watchers_count":2544,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":350,"mirror_url":null,"open_issues_count":63,"forks":350,"open_issues":63,"watchers":2544,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openzipkin/zipkin/pulls/541"},"html":{"href":"https://github.com/openzipkin/zipkin/pull/541"},"issue":{"href":"https://api.github.com/repos/openzipkin/zipkin/issues/541"},"comments":{"href":"https://api.github.com/repos/openzipkin/zipkin/issues/541/comments"},"review_comments":{"href":"https://api.github.com/repos/openzipkin/zipkin/pulls/541/comments"},"review_comment":{"href":"https://api.github.com/repos/openzipkin/zipkin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openzipkin/zipkin/pulls/541/commits"},"statuses":{"href":"https://api.github.com/repos/openzipkin/zipkin/statuses/d21c1e4cf50cb3a92e49c3948ba292820d90e88c"}}}}