{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/pub/issues/829","labels_url":"https://api.github.com/repos/dart-lang/pub/issues/829/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/pub/issues/829/comments","events_url":"https://api.github.com/repos/dart-lang/pub/issues/829/events","html_url":"https://github.com/dart-lang/pub/issues/829","id":85644900,"number":829,"title":"Pub: pass metadata environment variable to dart2js","user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/pub/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/dart-lang/pub/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-06-05T22:15:46Z","updated_at":"2015-06-05T22:15:49Z","closed_at":null,"body":"<a href=\"https://github.com/Fox32\"><img src=\"https://avatars.githubusercontent.com/u/648527?v=3\" align=\"left\" width=\"96\" height=\"96\"hspace=\"10\"></img></a> **Issue by [Fox32](https://github.com/Fox32)**\n_Originally opened as dart-lang/sdk#16370_\n\n----\n\nIt would be a nice to have if pub build/serve would pass the version (if it has one) of the current package (the package that is served, compiled) to dart2js as an environment variable (the new -D feature, e.g.: -DPACKAGE_VERSION=1.0.1+3).\n\nThat would allow developers to access the current version of their application via String.fromEnvironment('PACKAGE_VERSION'). There are many use cases, like displaying the current version in the application (to identify the versions on different environments) or including the version in error reports or ..."},"comment":{"url":"https://api.github.com/repos/dart-lang/pub/issues/comments/109458205","html_url":"https://github.com/dart-lang/pub/issues/829#issuecomment-109458205","issue_url":"https://api.github.com/repos/dart-lang/pub/issues/829","id":109458205,"user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T22:15:48Z","updated_at":"2015-06-05T22:15:48Z","body":"<a href=\"https://github.com/Fox32\"><img src=\"https://avatars.githubusercontent.com/u/648527?v=3\" align=\"left\" width=\"48\" height=\"48\"hspace=\"10\"></img></a> **Comment by [Fox32](https://github.com/Fox32)**\n\n----\n\n**Attachments:**\n[package_info_transformer.dart](https://storage.googleapis.com/google-code-attachments/dart/issue-16370/comment-12/package_info_transformer.dart) (1.94 KB)\n[package_info.dart](https://storage.googleapis.com/google-code-attachments/dart/issue-16370/comment-12/package_info.dart) (363 Bytes)"}}