{"action":"created","comment":{"url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/pulls/comments/185692975","pull_request_review_id":117132321,"id":185692975,"diff_hunk":"@@ -17,7 +17,8 @@ all: build\n \n SOURCEDIR=./ecr-login\n SOURCES := $(shell find $(SOURCEDIR) -name '*.go')\n-BINARY_NAME=docker-credential-ecr-login\n+VERSION := $(shell cat VERSION.txt)\n+BINARY_NAME=docker-credential-ecr-login-$(VERSION)","path":"Makefile","position":null,"original_position":6,"commit_id":"924690337d3df3d3d23ddfe3ff33394eec79c1f1","original_commit_id":"e5cc1844cdad700f251d16794df638a54f91fe5f","user":{"login":"srizzling","id":2313668,"avatar_url":"https://avatars3.githubusercontent.com/u/2313668?v=4","gravatar_id":"","url":"https://api.github.com/users/srizzling","html_url":"https://github.com/srizzling","followers_url":"https://api.github.com/users/srizzling/followers","following_url":"https://api.github.com/users/srizzling/following{/other_user}","gists_url":"https://api.github.com/users/srizzling/gists{/gist_id}","starred_url":"https://api.github.com/users/srizzling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srizzling/subscriptions","organizations_url":"https://api.github.com/users/srizzling/orgs","repos_url":"https://api.github.com/users/srizzling/repos","events_url":"https://api.github.com/users/srizzling/events{/privacy}","received_events_url":"https://api.github.com/users/srizzling/received_events","type":"User","site_admin":false},"body":"Fixed by 9246903","created_at":"2018-05-03T03:57:17Z","updated_at":"2018-05-03T03:57:17Z","html_url":"https://github.com/awslabs/amazon-ecr-credential-helper/pull/105#discussion_r185692975","pull_request_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/pulls/105","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/pulls/comments/185692975"},"html":{"href":"https://github.com/awslabs/amazon-ecr-credential-helper/pull/105#discussion_r185692975"},"pull_request":{"href":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/pulls/105"}},"in_reply_to_id":185277917},"pull_request":{"url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/pulls/105","id":184873397,"html_url":"https://github.com/awslabs/amazon-ecr-credential-helper/pull/105","diff_url":"https://github.com/awslabs/amazon-ecr-credential-helper/pull/105.diff","patch_url":"https://github.com/awslabs/amazon-ecr-credential-helper/pull/105.patch","issue_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/issues/105","number":105,"state":"open","locked":false,"title":"Add version to cli and user-agent","user":{"login":"srizzling","id":2313668,"avatar_url":"https://avatars3.githubusercontent.com/u/2313668?v=4","gravatar_id":"","url":"https://api.github.com/users/srizzling","html_url":"https://github.com/srizzling","followers_url":"https://api.github.com/users/srizzling/followers","following_url":"https://api.github.com/users/srizzling/following{/other_user}","gists_url":"https://api.github.com/users/srizzling/gists{/gist_id}","starred_url":"https://api.github.com/users/srizzling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srizzling/subscriptions","organizations_url":"https://api.github.com/users/srizzling/orgs","repos_url":"https://api.github.com/users/srizzling/repos","events_url":"https://api.github.com/users/srizzling/events{/privacy}","received_events_url":"https://api.github.com/users/srizzling/received_events","type":"User","site_admin":false},"body":"Hi there!\r\n\r\nI saw this #80, and thought I would provide an implementation of adding version to cli and useragent. I saw mentions of goreleaser which is definitely a good option to go for. So with that in mind, my PR allows easy integration with goreleaser, since you configure the LDFLAGS similar to the implementation made here.\r\n\r\nI made a whole bunch of assumptions, so please excuse any mistakes in that regard, but I thought I would just implement something first and then we can easily discuss if it was the right approach.\r\n\r\nConfusingly, `docker-credential-ecr-login` has a version command which setup in: https://github.com/docker/docker-credential-helpers/blob/f00de1b72fc8274c009c019a34d6bfade31c715c/credentials/version.go\r\n\r\nSo instead of `docker-credential-ecr-login version` the approach would be to go: `docker-credential-ecr-login -version` or `docker-credential-ecr-login -v`.\r\n\r\nI think I got the userdata stuff working, but I'm kinda fresh to golang, and I couldn't read how to run the tests or add tests to see if the user agent was set. If you could help me out that would be cool \r\n\r\nThanks,\r\nSriram\r\n","created_at":"2018-04-30T03:30:13Z","updated_at":"2018-05-03T03:57:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1ecd2c09354fe44c0871ac2625c0ad773604dc1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/pulls/105/commits","review_comments_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/pulls/105/comments","review_comment_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/issues/105/comments","statuses_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/statuses/924690337d3df3d3d23ddfe3ff33394eec79c1f1","head":{"label":"srizzling:adding-version-to-cli","ref":"adding-version-to-cli","sha":"924690337d3df3d3d23ddfe3ff33394eec79c1f1","user":{"login":"srizzling","id":2313668,"avatar_url":"https://avatars3.githubusercontent.com/u/2313668?v=4","gravatar_id":"","url":"https://api.github.com/users/srizzling","html_url":"https://github.com/srizzling","followers_url":"https://api.github.com/users/srizzling/followers","following_url":"https://api.github.com/users/srizzling/following{/other_user}","gists_url":"https://api.github.com/users/srizzling/gists{/gist_id}","starred_url":"https://api.github.com/users/srizzling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srizzling/subscriptions","organizations_url":"https://api.github.com/users/srizzling/orgs","repos_url":"https://api.github.com/users/srizzling/repos","events_url":"https://api.github.com/users/srizzling/events{/privacy}","received_events_url":"https://api.github.com/users/srizzling/received_events","type":"User","site_admin":false},"repo":{"id":131545338,"name":"amazon-ecr-credential-helper","full_name":"srizzling/amazon-ecr-credential-helper","owner":{"login":"srizzling","id":2313668,"avatar_url":"https://avatars3.githubusercontent.com/u/2313668?v=4","gravatar_id":"","url":"https://api.github.com/users/srizzling","html_url":"https://github.com/srizzling","followers_url":"https://api.github.com/users/srizzling/followers","following_url":"https://api.github.com/users/srizzling/following{/other_user}","gists_url":"https://api.github.com/users/srizzling/gists{/gist_id}","starred_url":"https://api.github.com/users/srizzling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srizzling/subscriptions","organizations_url":"https://api.github.com/users/srizzling/orgs","repos_url":"https://api.github.com/users/srizzling/repos","events_url":"https://api.github.com/users/srizzling/events{/privacy}","received_events_url":"https://api.github.com/users/srizzling/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srizzling/amazon-ecr-credential-helper","description":"Automatically gets credentials for Amazon ECR on docker push/docker pull","fork":true,"url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper","forks_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/forks","keys_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/teams","hooks_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/hooks","issue_events_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/issues/events{/number}","events_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/events","assignees_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/assignees{/user}","branches_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/branches{/branch}","tags_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/tags","blobs_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/git/refs{/sha}","trees_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/statuses/{sha}","languages_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/languages","stargazers_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/stargazers","contributors_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/contributors","subscribers_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/subscribers","subscription_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/subscription","commits_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/commits{/sha}","git_commits_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/git/commits{/sha}","comments_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/comments{/number}","issue_comment_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/issues/comments{/number}","contents_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/contents/{+path}","compare_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/merges","archive_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/downloads","issues_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/issues{/number}","pulls_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/pulls{/number}","milestones_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/milestones{/number}","notifications_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/labels{/name}","releases_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/releases{/id}","deployments_url":"https://api.github.com/repos/srizzling/amazon-ecr-credential-helper/deployments","created_at":"2018-04-30T01:43:58Z","updated_at":"2018-04-30T01:44:00Z","pushed_at":"2018-05-03T03:56:56Z","git_url":"git://github.com/srizzling/amazon-ecr-credential-helper.git","ssh_url":"git@github.com:srizzling/amazon-ecr-credential-helper.git","clone_url":"https://github.com/srizzling/amazon-ecr-credential-helper.git","svn_url":"https://github.com/srizzling/amazon-ecr-credential-helper","homepage":null,"size":535,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"awslabs:master","ref":"master","sha":"8549783ceff8405a4dcc02689409945565c0c7ea","user":{"login":"awslabs","id":3299148,"avatar_url":"https://avatars0.githubusercontent.com/u/3299148?v=4","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"repo":{"id":59514412,"name":"amazon-ecr-credential-helper","full_name":"awslabs/amazon-ecr-credential-helper","owner":{"login":"awslabs","id":3299148,"avatar_url":"https://avatars0.githubusercontent.com/u/3299148?v=4","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/awslabs/amazon-ecr-credential-helper","description":"Automatically gets credentials for Amazon ECR on docker push/docker pull","fork":false,"url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper","forks_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/forks","keys_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/teams","hooks_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/hooks","issue_events_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/issues/events{/number}","events_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/events","assignees_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/assignees{/user}","branches_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/branches{/branch}","tags_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/tags","blobs_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/git/refs{/sha}","trees_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/statuses/{sha}","languages_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/languages","stargazers_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/stargazers","contributors_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/contributors","subscribers_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/subscribers","subscription_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/subscription","commits_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/commits{/sha}","git_commits_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/git/commits{/sha}","comments_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/comments{/number}","issue_comment_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/issues/comments{/number}","contents_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/contents/{+path}","compare_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/merges","archive_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/downloads","issues_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/issues{/number}","pulls_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/pulls{/number}","milestones_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/milestones{/number}","notifications_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/labels{/name}","releases_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/releases{/id}","deployments_url":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/deployments","created_at":"2016-05-23T20:01:21Z","updated_at":"2018-05-03T01:04:39Z","pushed_at":"2018-05-03T03:56:57Z","git_url":"git://github.com/awslabs/amazon-ecr-credential-helper.git","ssh_url":"git@github.com:awslabs/amazon-ecr-credential-helper.git","clone_url":"https://github.com/awslabs/amazon-ecr-credential-helper.git","svn_url":"https://github.com/awslabs/amazon-ecr-credential-helper","homepage":null,"size":534,"stargazers_count":506,"watchers_count":506,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":88,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":88,"open_issues":19,"watchers":506,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/pulls/105"},"html":{"href":"https://github.com/awslabs/amazon-ecr-credential-helper/pull/105"},"issue":{"href":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/issues/105"},"comments":{"href":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/issues/105/comments"},"review_comments":{"href":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/pulls/105/comments"},"review_comment":{"href":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/pulls/105/commits"},"statuses":{"href":"https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/statuses/924690337d3df3d3d23ddfe3ff33394eec79c1f1"}},"author_association":"NONE"}}
{"actor":{"display_login":"srizzling"}}