{"action":"created","comment":{"url":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls/comments/53176379","id":53176379,"diff_hunk":"@@ -0,0 +1,81 @@\n+#!/bin/bash\n+# To be executed from the root project directory.\n+# Obtains R package from remote artifactory and executes local.sh script with package downloaded to temporary directory.\n+# Input arguments:\n+# -s [required] shiny webapp location where all shiny resources will be deployed\n+# -a [required] artifactory root location where R packages are stored along with latest.txt file pointing to the most recent package version\n+# -u [optional] user name to be authenticated against artifactory, set to currently logged in system user if not provided\n+# -p [optional] R package bundle full name which should be retrieved from artifactory. To be provided when one don't want to deploy most recent package version.\n+\n+while getopts \":s:a:u:p:x:\" opt; do\n+  case $opt in\n+    s) shiny_webapp_location=\"$OPTARG\"\n+    ;;\n+    a) artifactory_root=\"$OPTARG\"\n+    ;;\n+    u) user_name=\"$OPTARG\"\n+    ;;\n+    p) package_location=\"$OPTARG\"\n+    ;;\n+    x) password=\"$OPTARG\"\n+    ;;\n+    \\?) echo \"Invalid option -$OPTARG\" >&2\n+    ;;\n+  esac\n+done\n+\n+#quitting on error\n+set -e\n+\n+if [ -z \"${shiny_webapp_location}\" ]; then\n+    echo -s required input parameter value with shiny webapp location was not provided!\n+    exit 1\n+fi\n+\n+if [ -z \"${artifactory_root}\" ]; then\n+    echo -a required input parameter value with artifactory root location was not provided!\n+    exit 1\n+fi\n+\n+if [ -z \"${user_name}\" ]; then\n+    user_name=`whoami`\n+    echo setting artifactory user to current user: ${user_name}\n+fi\n+\n+if [ -z \"${password}\" ]; then\n+    password_chunk='--ask-password'\n+else\n+    password_chunk='--password '$password\n+fi\n+\n+if [ -z \"${package_name}\" ]; then\n+    if [ -z \"${password}\" ]; then\n+        echo enter artifactory password:\n+    fi\n+    package_name=`wget -O- --user=${user_name} ${password_chunk} ${artifactory_root}/latest.txt`\n+fi\n+\n+working_dir=/tmp/${package_name}/$(date +%s)","path":"scripts/deployment/artifactory.sh","position":58,"original_position":58,"commit_id":"b5b0e77d3dedabe2a8198ff778b5beaaef11b5d8","original_commit_id":"b5b0e77d3dedabe2a8198ff778b5beaaef11b5d8","user":{"login":"mkobos","id":1044091,"avatar_url":"https://avatars.githubusercontent.com/u/1044091?v=3","gravatar_id":"","url":"https://api.github.com/users/mkobos","html_url":"https://github.com/mkobos","followers_url":"https://api.github.com/users/mkobos/followers","following_url":"https://api.github.com/users/mkobos/following{/other_user}","gists_url":"https://api.github.com/users/mkobos/gists{/gist_id}","starred_url":"https://api.github.com/users/mkobos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkobos/subscriptions","organizations_url":"https://api.github.com/users/mkobos/orgs","repos_url":"https://api.github.com/users/mkobos/repos","events_url":"https://api.github.com/users/mkobos/events{/privacy}","received_events_url":"https://api.github.com/users/mkobos/received_events","type":"User","site_admin":false},"body":"As in the `local.sh` file:\r\n\r\n- Instead of this line and lines 58-62 I would just use something like `working_dir=mktemp -d /tmp/${package_name}.XXXXXX`.","created_at":"2016-02-17T15:08:17Z","updated_at":"2016-02-17T15:08:17Z","html_url":"https://github.com/CeON/rJavaPackageExample/pull/6#discussion_r53176379","pull_request_url":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls/comments/53176379"},"html":{"href":"https://github.com/CeON/rJavaPackageExample/pull/6#discussion_r53176379"},"pull_request":{"href":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls/6","id":59548573,"html_url":"https://github.com/CeON/rJavaPackageExample/pull/6","diff_url":"https://github.com/CeON/rJavaPackageExample/pull/6.diff","patch_url":"https://github.com/CeON/rJavaPackageExample/pull/6.patch","issue_url":"https://api.github.com/repos/CeON/rJavaPackageExample/issues/6","number":6,"state":"open","locked":false,"title":"shiny java package example","user":{"login":"marekhorst","id":11537389,"avatar_url":"https://avatars.githubusercontent.com/u/11537389?v=3","gravatar_id":"","url":"https://api.github.com/users/marekhorst","html_url":"https://github.com/marekhorst","followers_url":"https://api.github.com/users/marekhorst/followers","following_url":"https://api.github.com/users/marekhorst/following{/other_user}","gists_url":"https://api.github.com/users/marekhorst/gists{/gist_id}","starred_url":"https://api.github.com/users/marekhorst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marekhorst/subscriptions","organizations_url":"https://api.github.com/users/marekhorst/orgs","repos_url":"https://api.github.com/users/marekhorst/repos","events_url":"https://api.github.com/users/marekhorst/events{/privacy}","received_events_url":"https://api.github.com/users/marekhorst/received_events","type":"User","site_admin":false},"body":"Forgot to create PR for shiny package example. \r\n\r\nYou should find shiny package installation details in readme file.","created_at":"2016-02-16T20:23:45Z","updated_at":"2016-02-17T15:08:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7def438f6c1354b7b70588cd433fba6a24dc46fb","assignee":{"login":"mkobos","id":1044091,"avatar_url":"https://avatars.githubusercontent.com/u/1044091?v=3","gravatar_id":"","url":"https://api.github.com/users/mkobos","html_url":"https://github.com/mkobos","followers_url":"https://api.github.com/users/mkobos/followers","following_url":"https://api.github.com/users/mkobos/following{/other_user}","gists_url":"https://api.github.com/users/mkobos/gists{/gist_id}","starred_url":"https://api.github.com/users/mkobos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkobos/subscriptions","organizations_url":"https://api.github.com/users/mkobos/orgs","repos_url":"https://api.github.com/users/mkobos/repos","events_url":"https://api.github.com/users/mkobos/events{/privacy}","received_events_url":"https://api.github.com/users/mkobos/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls/6/commits","review_comments_url":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls/6/comments","review_comment_url":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CeON/rJavaPackageExample/issues/6/comments","statuses_url":"https://api.github.com/repos/CeON/rJavaPackageExample/statuses/b5b0e77d3dedabe2a8198ff778b5beaaef11b5d8","head":{"label":"CeON:mhorst_shiny_example","ref":"mhorst_shiny_example","sha":"b5b0e77d3dedabe2a8198ff778b5beaaef11b5d8","user":{"login":"CeON","id":2034254,"avatar_url":"https://avatars.githubusercontent.com/u/2034254?v=3","gravatar_id":"","url":"https://api.github.com/users/CeON","html_url":"https://github.com/CeON","followers_url":"https://api.github.com/users/CeON/followers","following_url":"https://api.github.com/users/CeON/following{/other_user}","gists_url":"https://api.github.com/users/CeON/gists{/gist_id}","starred_url":"https://api.github.com/users/CeON/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CeON/subscriptions","organizations_url":"https://api.github.com/users/CeON/orgs","repos_url":"https://api.github.com/users/CeON/repos","events_url":"https://api.github.com/users/CeON/events{/privacy}","received_events_url":"https://api.github.com/users/CeON/received_events","type":"Organization","site_admin":false},"repo":{"id":49278769,"name":"rJavaPackageExample","full_name":"CeON/rJavaPackageExample","owner":{"login":"CeON","id":2034254,"avatar_url":"https://avatars.githubusercontent.com/u/2034254?v=3","gravatar_id":"","url":"https://api.github.com/users/CeON","html_url":"https://github.com/CeON","followers_url":"https://api.github.com/users/CeON/followers","following_url":"https://api.github.com/users/CeON/following{/other_user}","gists_url":"https://api.github.com/users/CeON/gists{/gist_id}","starred_url":"https://api.github.com/users/CeON/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CeON/subscriptions","organizations_url":"https://api.github.com/users/CeON/orgs","repos_url":"https://api.github.com/users/CeON/repos","events_url":"https://api.github.com/users/CeON/events{/privacy}","received_events_url":"https://api.github.com/users/CeON/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CeON/rJavaPackageExample","description":"An example R package project that uses code written in Java","fork":false,"url":"https://api.github.com/repos/CeON/rJavaPackageExample","forks_url":"https://api.github.com/repos/CeON/rJavaPackageExample/forks","keys_url":"https://api.github.com/repos/CeON/rJavaPackageExample/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CeON/rJavaPackageExample/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CeON/rJavaPackageExample/teams","hooks_url":"https://api.github.com/repos/CeON/rJavaPackageExample/hooks","issue_events_url":"https://api.github.com/repos/CeON/rJavaPackageExample/issues/events{/number}","events_url":"https://api.github.com/repos/CeON/rJavaPackageExample/events","assignees_url":"https://api.github.com/repos/CeON/rJavaPackageExample/assignees{/user}","branches_url":"https://api.github.com/repos/CeON/rJavaPackageExample/branches{/branch}","tags_url":"https://api.github.com/repos/CeON/rJavaPackageExample/tags","blobs_url":"https://api.github.com/repos/CeON/rJavaPackageExample/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CeON/rJavaPackageExample/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CeON/rJavaPackageExample/git/refs{/sha}","trees_url":"https://api.github.com/repos/CeON/rJavaPackageExample/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CeON/rJavaPackageExample/statuses/{sha}","languages_url":"https://api.github.com/repos/CeON/rJavaPackageExample/languages","stargazers_url":"https://api.github.com/repos/CeON/rJavaPackageExample/stargazers","contributors_url":"https://api.github.com/repos/CeON/rJavaPackageExample/contributors","subscribers_url":"https://api.github.com/repos/CeON/rJavaPackageExample/subscribers","subscription_url":"https://api.github.com/repos/CeON/rJavaPackageExample/subscription","commits_url":"https://api.github.com/repos/CeON/rJavaPackageExample/commits{/sha}","git_commits_url":"https://api.github.com/repos/CeON/rJavaPackageExample/git/commits{/sha}","comments_url":"https://api.github.com/repos/CeON/rJavaPackageExample/comments{/number}","issue_comment_url":"https://api.github.com/repos/CeON/rJavaPackageExample/issues/comments{/number}","contents_url":"https://api.github.com/repos/CeON/rJavaPackageExample/contents/{+path}","compare_url":"https://api.github.com/repos/CeON/rJavaPackageExample/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CeON/rJavaPackageExample/merges","archive_url":"https://api.github.com/repos/CeON/rJavaPackageExample/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CeON/rJavaPackageExample/downloads","issues_url":"https://api.github.com/repos/CeON/rJavaPackageExample/issues{/number}","pulls_url":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls{/number}","milestones_url":"https://api.github.com/repos/CeON/rJavaPackageExample/milestones{/number}","notifications_url":"https://api.github.com/repos/CeON/rJavaPackageExample/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CeON/rJavaPackageExample/labels{/name}","releases_url":"https://api.github.com/repos/CeON/rJavaPackageExample/releases{/id}","deployments_url":"https://api.github.com/repos/CeON/rJavaPackageExample/deployments","created_at":"2016-01-08T15:12:27Z","updated_at":"2016-01-21T14:08:47Z","pushed_at":"2016-02-16T20:23:46Z","git_url":"git://github.com/CeON/rJavaPackageExample.git","ssh_url":"git@github.com:CeON/rJavaPackageExample.git","clone_url":"https://github.com/CeON/rJavaPackageExample.git","svn_url":"https://github.com/CeON/rJavaPackageExample","homepage":null,"size":31,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"CeON:master","ref":"master","sha":"352a44768ae2021cd8268dab128687704a40c825","user":{"login":"CeON","id":2034254,"avatar_url":"https://avatars.githubusercontent.com/u/2034254?v=3","gravatar_id":"","url":"https://api.github.com/users/CeON","html_url":"https://github.com/CeON","followers_url":"https://api.github.com/users/CeON/followers","following_url":"https://api.github.com/users/CeON/following{/other_user}","gists_url":"https://api.github.com/users/CeON/gists{/gist_id}","starred_url":"https://api.github.com/users/CeON/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CeON/subscriptions","organizations_url":"https://api.github.com/users/CeON/orgs","repos_url":"https://api.github.com/users/CeON/repos","events_url":"https://api.github.com/users/CeON/events{/privacy}","received_events_url":"https://api.github.com/users/CeON/received_events","type":"Organization","site_admin":false},"repo":{"id":49278769,"name":"rJavaPackageExample","full_name":"CeON/rJavaPackageExample","owner":{"login":"CeON","id":2034254,"avatar_url":"https://avatars.githubusercontent.com/u/2034254?v=3","gravatar_id":"","url":"https://api.github.com/users/CeON","html_url":"https://github.com/CeON","followers_url":"https://api.github.com/users/CeON/followers","following_url":"https://api.github.com/users/CeON/following{/other_user}","gists_url":"https://api.github.com/users/CeON/gists{/gist_id}","starred_url":"https://api.github.com/users/CeON/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CeON/subscriptions","organizations_url":"https://api.github.com/users/CeON/orgs","repos_url":"https://api.github.com/users/CeON/repos","events_url":"https://api.github.com/users/CeON/events{/privacy}","received_events_url":"https://api.github.com/users/CeON/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CeON/rJavaPackageExample","description":"An example R package project that uses code written in Java","fork":false,"url":"https://api.github.com/repos/CeON/rJavaPackageExample","forks_url":"https://api.github.com/repos/CeON/rJavaPackageExample/forks","keys_url":"https://api.github.com/repos/CeON/rJavaPackageExample/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CeON/rJavaPackageExample/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CeON/rJavaPackageExample/teams","hooks_url":"https://api.github.com/repos/CeON/rJavaPackageExample/hooks","issue_events_url":"https://api.github.com/repos/CeON/rJavaPackageExample/issues/events{/number}","events_url":"https://api.github.com/repos/CeON/rJavaPackageExample/events","assignees_url":"https://api.github.com/repos/CeON/rJavaPackageExample/assignees{/user}","branches_url":"https://api.github.com/repos/CeON/rJavaPackageExample/branches{/branch}","tags_url":"https://api.github.com/repos/CeON/rJavaPackageExample/tags","blobs_url":"https://api.github.com/repos/CeON/rJavaPackageExample/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CeON/rJavaPackageExample/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CeON/rJavaPackageExample/git/refs{/sha}","trees_url":"https://api.github.com/repos/CeON/rJavaPackageExample/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CeON/rJavaPackageExample/statuses/{sha}","languages_url":"https://api.github.com/repos/CeON/rJavaPackageExample/languages","stargazers_url":"https://api.github.com/repos/CeON/rJavaPackageExample/stargazers","contributors_url":"https://api.github.com/repos/CeON/rJavaPackageExample/contributors","subscribers_url":"https://api.github.com/repos/CeON/rJavaPackageExample/subscribers","subscription_url":"https://api.github.com/repos/CeON/rJavaPackageExample/subscription","commits_url":"https://api.github.com/repos/CeON/rJavaPackageExample/commits{/sha}","git_commits_url":"https://api.github.com/repos/CeON/rJavaPackageExample/git/commits{/sha}","comments_url":"https://api.github.com/repos/CeON/rJavaPackageExample/comments{/number}","issue_comment_url":"https://api.github.com/repos/CeON/rJavaPackageExample/issues/comments{/number}","contents_url":"https://api.github.com/repos/CeON/rJavaPackageExample/contents/{+path}","compare_url":"https://api.github.com/repos/CeON/rJavaPackageExample/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CeON/rJavaPackageExample/merges","archive_url":"https://api.github.com/repos/CeON/rJavaPackageExample/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CeON/rJavaPackageExample/downloads","issues_url":"https://api.github.com/repos/CeON/rJavaPackageExample/issues{/number}","pulls_url":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls{/number}","milestones_url":"https://api.github.com/repos/CeON/rJavaPackageExample/milestones{/number}","notifications_url":"https://api.github.com/repos/CeON/rJavaPackageExample/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CeON/rJavaPackageExample/labels{/name}","releases_url":"https://api.github.com/repos/CeON/rJavaPackageExample/releases{/id}","deployments_url":"https://api.github.com/repos/CeON/rJavaPackageExample/deployments","created_at":"2016-01-08T15:12:27Z","updated_at":"2016-01-21T14:08:47Z","pushed_at":"2016-02-16T20:23:46Z","git_url":"git://github.com/CeON/rJavaPackageExample.git","ssh_url":"git@github.com:CeON/rJavaPackageExample.git","clone_url":"https://github.com/CeON/rJavaPackageExample.git","svn_url":"https://github.com/CeON/rJavaPackageExample","homepage":null,"size":31,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls/6"},"html":{"href":"https://github.com/CeON/rJavaPackageExample/pull/6"},"issue":{"href":"https://api.github.com/repos/CeON/rJavaPackageExample/issues/6"},"comments":{"href":"https://api.github.com/repos/CeON/rJavaPackageExample/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CeON/rJavaPackageExample/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/CeON/rJavaPackageExample/statuses/b5b0e77d3dedabe2a8198ff778b5beaaef11b5d8"}}}}