{"action":"created","comment":{"url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/comments/32068803","id":32068803,"diff_hunk":"@@ -21,28 +21,80 @@\n # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n # THE SOFTWARE.\n \n-if [ \"$TRAVIS_REPO_SLUG\" != \"OfficeDev/ews-java-api\" ]; then \n-\techo \"[DEPLOY] Skipping snapshot deployment for repo:'$TRAVIS_REPO_SLUG'.\"\n+set -e # Any subsequent(*) commands which fail will cause the shell script to exit immediately\n+\n+if [ \"$TRAVIS_REPO_SLUG\" != \"OfficeDev/ews-java-api\" ]; then\n+    echo \"[DEPLOY] Skipping snapshot deployment for repo:'$TRAVIS_REPO_SLUG'.\"\n elif [ \"$TRAVIS_PULL_REQUEST\" != \"false\" ]; then\n-\techo \"[DEPLOY] Skipping snapshot deployment for a pull request.\"\n+    echo \"[DEPLOY] Skipping snapshot deployment for a pull request.\"\n elif [ \"$TRAVIS_BRANCH\" != \"master\" ]; then\n-\techo \"[DEPLOY] Skipping snapshot deployment for branch:'$TRAVIS_BRANCH'.\"\n+    echo \"[DEPLOY] Skipping snapshot deployment for branch:'$TRAVIS_BRANCH'.\"\n elif [ \"$TRAVIS_SECURE_ENV_VARS\" == \"false\" ]; then\n-\techo \"[DEPLOY] Skipping snapshot deployment due to TRAVIS_SECURE_ENV_VARS is set to '$TRAVIS_SECURE_ENV_VARS'.\"\n+    echo \"[DEPLOY] Skipping snapshot deployment due to TRAVIS_SECURE_ENV_VARS is set to '$TRAVIS_SECURE_ENV_VARS'.\"\n elif [ \"$TRAVIS_JDK_VERSION\" != \"oraclejdk7\" ]; then\n-\techo \"[DEPLOY] Skipping snapshot deployment for jdk:'$TRAVIS_JDK_VERSION'.\"\n-else \n-\techo \"[DEPLOY] Deploying snapshot for commit:'$TRAVIS_COMMIT' @ build-id:'$TRAVIS_BUILD_ID'\"\t\n-\t# create settings.xml\n-\techo \"<settings><servers><server><id>ossrh-snapshot</id><username>${OSSRHUSER}</username><password>${OSSRHPASS}</password></server></servers></settings>\" > $HOME/.m2/settings.xml\n-\t# deploy\n-\tif [ -z \"${GPG_PASSPHRASE+xxx}\" ]; then\n-\t    echo \"[INFO] Deploying unsigned artifacts\"\n-            mvn clean deploy --settings=\"$HOME/.m2/settings.xml\" -Dmaven.test.skip=true\n-        else\n-            echo \"[INFO] Deploying signed artifacts\"\n-            mvn clean deploy --settings=\"$HOME/.m2/settings.xml\" -Dmaven.test.skip=true -Dgpg.passphrase=$GPG_PASSPHRASE\n-        fi\n-\t# clean up\n-\trm -f $HOME/.m2/settings.xml\n-fi\n+    echo \"[DEPLOY] Skipping snapshot deployment for jdk:'$TRAVIS_JDK_VERSION'.\"\n+else\n+    echo \"[DEPLOY] Deploying snapshot for commit:'$TRAVIS_COMMIT' @ build-id:'$TRAVIS_BUILD_ID'\"\n+    # create settings.xml\n+    echo \"<settings><servers><server><id>ossrh-snapshot</id><username>${OSSRHUSER}</username><password>${OSSRHPASS}</password></server></servers></settings>\" > $HOME/.m2/settings.xml\n+    # deploy\n+    if [ -z \"${GPG_PASSPHRASE+xxx}\" ]; then\n+       echo \"[INFO] Deploying unsigned artifacts\"\n+       mvn clean deploy --settings=\"$HOME/.m2/settings.xml\" -Dmaven.test.skip=true\n+    else\n+       echo \"[INFO] Deploying signed artifacts\"\n+       mvn clean deploy --settings=\"$HOME/.m2/settings.xml\" -Dmaven.test.skip=true -Dgpg.passphrase=$GPG_PASSPHRASE\n+    fi\n+    # clean up\n+    rm -f $HOME/.m2/settings.xml\n+    echo \"[DEPLOY] Done deploying snapshot\"\n+\n+    if [ -z \"${GITHUB_USER+xxx}\" ]; then\n+       echo \"[GH-PAGES] Deployment of gh-pages skipped. No GITHUB_TOKEN set.\"\n+    else\n+       # download hub\n+       mkdir -m777 -v -p \"$HOME/download\" ; cd \"$HOME/download\" && { curl -L https://github.com/github/hub/releases/download/v2.2.1/hub-linux-amd64-2.2.1.tar.gz | tar xz ; cd -; }\n+\n+       # init travis-user\n+       [[ -d \"$HOME/.config\" ]] || mkdir -m777 -v -p $HOME/.config\n+       echo -e \"github.com:\\n- user: ${GITHUB_USERNAME}\\n  oauth_token: ${GITHUB_TOKEN}\\n  protocol: https\\n\" > $HOME/.config/hub\n+\n+       git config --global user.email \"travis@travis-ci.org\"\n+       git config --global user.name \"travis-ci\"\n+\n+       mvn clean site\n+\n+       echo \"[GH-PAGES] Deploying gh-pages for $TRAVIS_BRANCH\"\n+\n+       # clone actual gh-pages repo\n+       cd \"$HOME/OfficeDev\"\n+       echo \"[GH-PAGES] Cloning travis-user fork\"\n+       git clone -q --progress -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/OfficeDev/ews-java-api.git gh-pages && cd gh-pages\n+       git remote add upstream https://github.com/OfficeDev/ews-java-api.git\n+       echo \"[GH-PAGES] Updating origin if needed\"\n+       git fetch -q --progress upstream gh-pages\n+       git merge -q --progress upstream/gh-pages gh-pages\n+       git push -fq --progress origin gh-pages\n+\n+       echo \"[GH-PAGES] Applying local changes\"\n+       git rm -rf --ignore-unmatch \"./docs/snapshots/$TRAVIS_BRANCH\"\n+       mkdir -m777 -v -p \"./docs/snapshots/$TRAVIS_BRANCH\"\n+\n+       # copy all the builded stuff into the snapshot dir\n+       cp -Rf \"$HOME/OfficeDev/ews-java-api/target/site/*\" \"./docs/snapshots/$TRAVIS_BRANCH\"\n+\n+       git add .\n+       echo \"[GH-PAGES] Committing changes to local repository\"\n+       git commit --author \"travis-ci <travis@travis-ci.org>\" -m \"[TRAVIS]Deploy mvn site to [gh-pages/$TRAVIS_BRANCH] @ $TRAVIS_BUILD_NUMBER\"\n+       echo \"[GH-PAGES] Pushing changes to origin gh-pages\"\n+       git push -fq --progress origin gh-pages\n+\n+       echo \"[GH-PAGES] Creating a PR\"","path":"deploy_snapshot.sh","position":93,"original_position":93,"commit_id":"5ed3a822e45eea2310194f94a98c1ccb4cf26ddf","original_commit_id":"5ed3a822e45eea2310194f94a98c1ccb4cf26ddf","user":{"login":"vboctor","id":6446,"avatar_url":"https://avatars.githubusercontent.com/u/6446?v=3","gravatar_id":"","url":"https://api.github.com/users/vboctor","html_url":"https://github.com/vboctor","followers_url":"https://api.github.com/users/vboctor/followers","following_url":"https://api.github.com/users/vboctor/following{/other_user}","gists_url":"https://api.github.com/users/vboctor/gists{/gist_id}","starred_url":"https://api.github.com/users/vboctor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vboctor/subscriptions","organizations_url":"https://api.github.com/users/vboctor/orgs","repos_url":"https://api.github.com/users/vboctor/repos","events_url":"https://api.github.com/users/vboctor/events{/privacy}","received_events_url":"https://api.github.com/users/vboctor/received_events","type":"User","site_admin":false},"body":"What happens if there are no changes in git.  Is this going to make commit command fails and hence script exists?  If so, let's clarify in the comments.  The goal is no pull request if no change of course.","created_at":"2015-06-09T21:52:01Z","updated_at":"2015-06-09T21:52:01Z","html_url":"https://github.com/OfficeDev/ews-java-api/pull/340#discussion_r32068803","pull_request_url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/340","_links":{"self":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/comments/32068803"},"html":{"href":"https://github.com/OfficeDev/ews-java-api/pull/340#discussion_r32068803"},"pull_request":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/340"}}},"pull_request":{"url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/340","id":36842282,"html_url":"https://github.com/OfficeDev/ews-java-api/pull/340","diff_url":"https://github.com/OfficeDev/ews-java-api/pull/340.diff","patch_url":"https://github.com/OfficeDev/ews-java-api/pull/340.patch","issue_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/340","number":340,"state":"open","locked":false,"title":"travis deployment of site to gh-pages branch","user":{"login":"serious6","id":3902037,"avatar_url":"https://avatars.githubusercontent.com/u/3902037?v=3","gravatar_id":"","url":"https://api.github.com/users/serious6","html_url":"https://github.com/serious6","followers_url":"https://api.github.com/users/serious6/followers","following_url":"https://api.github.com/users/serious6/following{/other_user}","gists_url":"https://api.github.com/users/serious6/gists{/gist_id}","starred_url":"https://api.github.com/users/serious6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serious6/subscriptions","organizations_url":"https://api.github.com/users/serious6/orgs","repos_url":"https://api.github.com/users/serious6/repos","events_url":"https://api.github.com/users/serious6/events{/privacy}","received_events_url":"https://api.github.com/users/serious6/received_events","type":"User","site_admin":false},"body":"script will now also deploy the generated site to gh-pages branch after deploying javadoc and sources to maven central. if one of the mentioned steps fail the script will exit.\r\n\r\nOnce we generated a gh-page this will enable people to see the actual generated site artifacts and javadoc without executing these steps locally. ","created_at":"2015-06-03T15:04:35Z","updated_at":"2015-06-09T21:52:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a0160983b4675b1c0e0795aa2c5347560a9060c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/340/commits","review_comments_url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/340/comments","review_comment_url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/340/comments","statuses_url":"https://api.github.com/repos/OfficeDev/ews-java-api/statuses/5ed3a822e45eea2310194f94a98c1ccb4cf26ddf","head":{"label":"serious6:deploy_javadoc","ref":"deploy_javadoc","sha":"5ed3a822e45eea2310194f94a98c1ccb4cf26ddf","user":{"login":"serious6","id":3902037,"avatar_url":"https://avatars.githubusercontent.com/u/3902037?v=3","gravatar_id":"","url":"https://api.github.com/users/serious6","html_url":"https://github.com/serious6","followers_url":"https://api.github.com/users/serious6/followers","following_url":"https://api.github.com/users/serious6/following{/other_user}","gists_url":"https://api.github.com/users/serious6/gists{/gist_id}","starred_url":"https://api.github.com/users/serious6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serious6/subscriptions","organizations_url":"https://api.github.com/users/serious6/orgs","repos_url":"https://api.github.com/users/serious6/repos","events_url":"https://api.github.com/users/serious6/events{/privacy}","received_events_url":"https://api.github.com/users/serious6/received_events","type":"User","site_admin":false},"repo":{"id":26131809,"name":"ews-java-api","full_name":"serious6/ews-java-api","owner":{"login":"serious6","id":3902037,"avatar_url":"https://avatars.githubusercontent.com/u/3902037?v=3","gravatar_id":"","url":"https://api.github.com/users/serious6","html_url":"https://github.com/serious6","followers_url":"https://api.github.com/users/serious6/followers","following_url":"https://api.github.com/users/serious6/following{/other_user}","gists_url":"https://api.github.com/users/serious6/gists{/gist_id}","starred_url":"https://api.github.com/users/serious6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serious6/subscriptions","organizations_url":"https://api.github.com/users/serious6/orgs","repos_url":"https://api.github.com/users/serious6/repos","events_url":"https://api.github.com/users/serious6/events{/privacy}","received_events_url":"https://api.github.com/users/serious6/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/serious6/ews-java-api","description":"A java client library to access Exchange web services.  The API works against Office 365 Exchange Online as well as on premises Exchange.","fork":true,"url":"https://api.github.com/repos/serious6/ews-java-api","forks_url":"https://api.github.com/repos/serious6/ews-java-api/forks","keys_url":"https://api.github.com/repos/serious6/ews-java-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/serious6/ews-java-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/serious6/ews-java-api/teams","hooks_url":"https://api.github.com/repos/serious6/ews-java-api/hooks","issue_events_url":"https://api.github.com/repos/serious6/ews-java-api/issues/events{/number}","events_url":"https://api.github.com/repos/serious6/ews-java-api/events","assignees_url":"https://api.github.com/repos/serious6/ews-java-api/assignees{/user}","branches_url":"https://api.github.com/repos/serious6/ews-java-api/branches{/branch}","tags_url":"https://api.github.com/repos/serious6/ews-java-api/tags","blobs_url":"https://api.github.com/repos/serious6/ews-java-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/serious6/ews-java-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/serious6/ews-java-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/serious6/ews-java-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/serious6/ews-java-api/statuses/{sha}","languages_url":"https://api.github.com/repos/serious6/ews-java-api/languages","stargazers_url":"https://api.github.com/repos/serious6/ews-java-api/stargazers","contributors_url":"https://api.github.com/repos/serious6/ews-java-api/contributors","subscribers_url":"https://api.github.com/repos/serious6/ews-java-api/subscribers","subscription_url":"https://api.github.com/repos/serious6/ews-java-api/subscription","commits_url":"https://api.github.com/repos/serious6/ews-java-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/serious6/ews-java-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/serious6/ews-java-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/serious6/ews-java-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/serious6/ews-java-api/contents/{+path}","compare_url":"https://api.github.com/repos/serious6/ews-java-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/serious6/ews-java-api/merges","archive_url":"https://api.github.com/repos/serious6/ews-java-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/serious6/ews-java-api/downloads","issues_url":"https://api.github.com/repos/serious6/ews-java-api/issues{/number}","pulls_url":"https://api.github.com/repos/serious6/ews-java-api/pulls{/number}","milestones_url":"https://api.github.com/repos/serious6/ews-java-api/milestones{/number}","notifications_url":"https://api.github.com/repos/serious6/ews-java-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/serious6/ews-java-api/labels{/name}","releases_url":"https://api.github.com/repos/serious6/ews-java-api/releases{/id}","created_at":"2014-11-03T18:13:27Z","updated_at":"2015-04-28T14:02:51Z","pushed_at":"2015-06-05T15:49:55Z","git_url":"git://github.com/serious6/ews-java-api.git","ssh_url":"git@github.com:serious6/ews-java-api.git","clone_url":"https://github.com/serious6/ews-java-api.git","svn_url":"https://github.com/serious6/ews-java-api","homepage":"","size":7679,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"OfficeDev:master","ref":"master","sha":"75904e28c7de31dc611206508f2f55fd62c13e34","user":{"login":"OfficeDev","id":6789362,"avatar_url":"https://avatars.githubusercontent.com/u/6789362?v=3","gravatar_id":"","url":"https://api.github.com/users/OfficeDev","html_url":"https://github.com/OfficeDev","followers_url":"https://api.github.com/users/OfficeDev/followers","following_url":"https://api.github.com/users/OfficeDev/following{/other_user}","gists_url":"https://api.github.com/users/OfficeDev/gists{/gist_id}","starred_url":"https://api.github.com/users/OfficeDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OfficeDev/subscriptions","organizations_url":"https://api.github.com/users/OfficeDev/orgs","repos_url":"https://api.github.com/users/OfficeDev/repos","events_url":"https://api.github.com/users/OfficeDev/events{/privacy}","received_events_url":"https://api.github.com/users/OfficeDev/received_events","type":"Organization","site_admin":false},"repo":{"id":23322482,"name":"ews-java-api","full_name":"OfficeDev/ews-java-api","owner":{"login":"OfficeDev","id":6789362,"avatar_url":"https://avatars.githubusercontent.com/u/6789362?v=3","gravatar_id":"","url":"https://api.github.com/users/OfficeDev","html_url":"https://github.com/OfficeDev","followers_url":"https://api.github.com/users/OfficeDev/followers","following_url":"https://api.github.com/users/OfficeDev/following{/other_user}","gists_url":"https://api.github.com/users/OfficeDev/gists{/gist_id}","starred_url":"https://api.github.com/users/OfficeDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OfficeDev/subscriptions","organizations_url":"https://api.github.com/users/OfficeDev/orgs","repos_url":"https://api.github.com/users/OfficeDev/repos","events_url":"https://api.github.com/users/OfficeDev/events{/privacy}","received_events_url":"https://api.github.com/users/OfficeDev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OfficeDev/ews-java-api","description":"A java client library to access Exchange web services.  The API works against Office 365 Exchange Online as well as on premises Exchange.","fork":false,"url":"https://api.github.com/repos/OfficeDev/ews-java-api","forks_url":"https://api.github.com/repos/OfficeDev/ews-java-api/forks","keys_url":"https://api.github.com/repos/OfficeDev/ews-java-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OfficeDev/ews-java-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OfficeDev/ews-java-api/teams","hooks_url":"https://api.github.com/repos/OfficeDev/ews-java-api/hooks","issue_events_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/events{/number}","events_url":"https://api.github.com/repos/OfficeDev/ews-java-api/events","assignees_url":"https://api.github.com/repos/OfficeDev/ews-java-api/assignees{/user}","branches_url":"https://api.github.com/repos/OfficeDev/ews-java-api/branches{/branch}","tags_url":"https://api.github.com/repos/OfficeDev/ews-java-api/tags","blobs_url":"https://api.github.com/repos/OfficeDev/ews-java-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OfficeDev/ews-java-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OfficeDev/ews-java-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/OfficeDev/ews-java-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OfficeDev/ews-java-api/statuses/{sha}","languages_url":"https://api.github.com/repos/OfficeDev/ews-java-api/languages","stargazers_url":"https://api.github.com/repos/OfficeDev/ews-java-api/stargazers","contributors_url":"https://api.github.com/repos/OfficeDev/ews-java-api/contributors","subscribers_url":"https://api.github.com/repos/OfficeDev/ews-java-api/subscribers","subscription_url":"https://api.github.com/repos/OfficeDev/ews-java-api/subscription","commits_url":"https://api.github.com/repos/OfficeDev/ews-java-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/OfficeDev/ews-java-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/OfficeDev/ews-java-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/OfficeDev/ews-java-api/contents/{+path}","compare_url":"https://api.github.com/repos/OfficeDev/ews-java-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OfficeDev/ews-java-api/merges","archive_url":"https://api.github.com/repos/OfficeDev/ews-java-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OfficeDev/ews-java-api/downloads","issues_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues{/number}","pulls_url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls{/number}","milestones_url":"https://api.github.com/repos/OfficeDev/ews-java-api/milestones{/number}","notifications_url":"https://api.github.com/repos/OfficeDev/ews-java-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OfficeDev/ews-java-api/labels{/name}","releases_url":"https://api.github.com/repos/OfficeDev/ews-java-api/releases{/id}","created_at":"2014-08-25T17:33:09Z","updated_at":"2015-06-04T11:38:08Z","pushed_at":"2015-06-09T19:06:10Z","git_url":"git://github.com/OfficeDev/ews-java-api.git","ssh_url":"git@github.com:OfficeDev/ews-java-api.git","clone_url":"https://github.com/OfficeDev/ews-java-api.git","svn_url":"https://github.com/OfficeDev/ews-java-api","homepage":"","size":13072,"stargazers_count":175,"watchers_count":175,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":144,"mirror_url":null,"open_issues_count":83,"forks":144,"open_issues":83,"watchers":175,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/340"},"html":{"href":"https://github.com/OfficeDev/ews-java-api/pull/340"},"issue":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/340"},"comments":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/340/comments"},"review_comments":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/340/comments"},"review_comment":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/340/commits"},"statuses":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/statuses/5ed3a822e45eea2310194f94a98c1ccb4cf26ddf"}}}}