{"action":"created","issue":{"url":"https://api.github.com/repos/kbknapp/clap-rs/issues/527","repository_url":"https://api.github.com/repos/kbknapp/clap-rs","labels_url":"https://api.github.com/repos/kbknapp/clap-rs/issues/527/labels{/name}","comments_url":"https://api.github.com/repos/kbknapp/clap-rs/issues/527/comments","events_url":"https://api.github.com/repos/kbknapp/clap-rs/issues/527/events","html_url":"https://github.com/kbknapp/clap-rs/issues/527","id":159767283,"number":527,"title":"Normal method for embedding git commit in the version?","user":{"login":"nathanaeljones","id":107935,"avatar_url":"https://avatars.githubusercontent.com/u/107935?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanaeljones","html_url":"https://github.com/nathanaeljones","followers_url":"https://api.github.com/users/nathanaeljones/followers","following_url":"https://api.github.com/users/nathanaeljones/following{/other_user}","gists_url":"https://api.github.com/users/nathanaeljones/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanaeljones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanaeljones/subscriptions","organizations_url":"https://api.github.com/users/nathanaeljones/orgs","repos_url":"https://api.github.com/users/nathanaeljones/repos","events_url":"https://api.github.com/users/nathanaeljones/events{/privacy}","received_events_url":"https://api.github.com/users/nathanaeljones/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-11T10:32:44Z","updated_at":"2016-06-12T19:36:36Z","closed_at":null,"body":"I want to be able to track down what version of the software a user is using, based on git commit ID.\r\n\r\nI see this showing up in most Rust command-line tools, but I haven't figured out how it's done. \r\n\r\nAny suggestions?"},"comment":{"url":"https://api.github.com/repos/kbknapp/clap-rs/issues/comments/225455948","html_url":"https://github.com/kbknapp/clap-rs/issues/527#issuecomment-225455948","issue_url":"https://api.github.com/repos/kbknapp/clap-rs/issues/527","id":225455948,"user":{"login":"kbknapp","id":6942134,"avatar_url":"https://avatars.githubusercontent.com/u/6942134?v=3","gravatar_id":"","url":"https://api.github.com/users/kbknapp","html_url":"https://github.com/kbknapp","followers_url":"https://api.github.com/users/kbknapp/followers","following_url":"https://api.github.com/users/kbknapp/following{/other_user}","gists_url":"https://api.github.com/users/kbknapp/gists{/gist_id}","starred_url":"https://api.github.com/users/kbknapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbknapp/subscriptions","organizations_url":"https://api.github.com/users/kbknapp/orgs","repos_url":"https://api.github.com/users/kbknapp/repos","events_url":"https://api.github.com/users/kbknapp/events{/privacy}","received_events_url":"https://api.github.com/users/kbknapp/received_events","type":"User","site_admin":false},"created_at":"2016-06-12T19:36:36Z","updated_at":"2016-06-12T19:36:36Z","body":"You can either manually add the commit hash and just add it your version with `App::version` as in:\r\n\r\n```rust\r\nconst LATEST_COMMIT: &'static str = \"abcd1234\";\r\nfn main() {\r\n    App::new(\"prog\").version(&*format!(\"v1.2.3 ({})\", LATEST_COMMIT));\r\n}\r\n```\r\n\r\nBut what I think most people do is add a [`build.rs`](http://doc.crates.io/build-script.html) script to pull the latest commit hash automatically.\r\n\r\nAlthough this isn't really anything specific to `clap`."}}
{"actor":{"display_login":"kbknapp"}}