{"action":"created","issue":{"url":"https://api.github.com/repos/conda/conda-build/issues/1023","repository_url":"https://api.github.com/repos/conda/conda-build","labels_url":"https://api.github.com/repos/conda/conda-build/issues/1023/labels{/name}","comments_url":"https://api.github.com/repos/conda/conda-build/issues/1023/comments","events_url":"https://api.github.com/repos/conda/conda-build/issues/1023/events","html_url":"https://github.com/conda/conda-build/issues/1023","id":160082140,"number":1023,"title":"__conda_buildnum__.txt feature is broken (and its deprecation is not documented)","user":{"login":"mwiebe","id":399551,"avatar_url":"https://avatars.githubusercontent.com/u/399551?v=3","gravatar_id":"","url":"https://api.github.com/users/mwiebe","html_url":"https://github.com/mwiebe","followers_url":"https://api.github.com/users/mwiebe/followers","following_url":"https://api.github.com/users/mwiebe/following{/other_user}","gists_url":"https://api.github.com/users/mwiebe/gists{/gist_id}","starred_url":"https://api.github.com/users/mwiebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwiebe/subscriptions","organizations_url":"https://api.github.com/users/mwiebe/orgs","repos_url":"https://api.github.com/users/mwiebe/repos","events_url":"https://api.github.com/users/mwiebe/events{/privacy}","received_events_url":"https://api.github.com/users/mwiebe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":33,"created_at":"2016-06-14T02:04:05Z","updated_at":"2016-07-29T00:59:55Z","closed_at":null,"body":"Got this in a build:\r\n\r\n```\r\n2016-06-13 18:50:45:  0: STDOUT: Deprecation warning: support for __conda_buildnum__ will be removed in Conda build 2.0.Try Jinja templates instead: http://conda.pydata.org/docs/building/environment-vars.html#git-environment-variables\r\n2016-06-13 18:50:45:  0: STDOUT: Setting build number from __conda_buildnum__.txt: 2\r\n2016-06-13 18:50:45:  0: STDOUT: Traceback (most recent call last):\r\n2016-06-13 18:50:45:  0: STDOUT:   File \"C:\\Anaconda3\\Scripts\\conda-build-script.py\", line 4, in <module>\r\n2016-06-13 18:50:45:  0: STDOUT:     sys.exit(main())\r\n2016-06-13 18:50:45:  0: STDOUT:   File \"C:\\Anaconda3\\lib\\site-packages\\conda_build\\main_build.py\", line 134, in main\r\n2016-06-13 18:50:45:  0: STDOUT:     args_func(args, p)\r\n2016-06-13 18:50:45:  0: STDOUT:   File \"C:\\Anaconda3\\lib\\site-packages\\conda_build\\main_build.py\", line 373, in args_func\r\n2016-06-13 18:50:45:  0: STDOUT:     args.func(args, p)\r\n2016-06-13 18:50:45:  0: STDOUT:   File \"C:\\Anaconda3\\lib\\site-packages\\conda_build\\main_build.py\", line 320, in execute\r\n2016-06-13 18:50:45:  0: STDOUT:     need_source_download=need_source_download)\r\n2016-06-13 18:50:45:  0: STDOUT:   File \"C:\\Anaconda3\\lib\\site-packages\\conda_build\\build.py\", line 523, in build\r\n2016-06-13 18:50:45:  0: STDOUT:     get_build_metadata(m)\r\n2016-06-13 18:50:45:  0: STDOUT:   File \"C:\\Anaconda3\\lib\\site-packages\\conda_build\\post.py\", line 394, in get_build_metadata\r\n2016-06-13 18:50:45:  0: STDOUT:     m.meta['build']['number'] = build_number\r\n2016-06-13 18:50:45:  0: STDOUT: KeyError: 'build'\r\n```\r\n\r\nAlso couldn't find any reference to the deprecations in https://github.com/conda/conda-build/commit/1cd1c5cd8301a563319bd12916687dba3f090c2e in the changelog, documentation, or an issue. We're using this feature to automatically bump up the build number to one after the latest version already in the conda repo the package will be uploaded to. Can you suggest a way to do that with the recommended jinja templates?"},"comment":{"url":"https://api.github.com/repos/conda/conda-build/issues/comments/236067979","html_url":"https://github.com/conda/conda-build/issues/1023#issuecomment-236067979","issue_url":"https://api.github.com/repos/conda/conda-build/issues/1023","id":236067979,"user":{"login":"msarahan","id":38393,"avatar_url":"https://avatars.githubusercontent.com/u/38393?v=3","gravatar_id":"","url":"https://api.github.com/users/msarahan","html_url":"https://github.com/msarahan","followers_url":"https://api.github.com/users/msarahan/followers","following_url":"https://api.github.com/users/msarahan/following{/other_user}","gists_url":"https://api.github.com/users/msarahan/gists{/gist_id}","starred_url":"https://api.github.com/users/msarahan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msarahan/subscriptions","organizations_url":"https://api.github.com/users/msarahan/orgs","repos_url":"https://api.github.com/users/msarahan/repos","events_url":"https://api.github.com/users/msarahan/events{/privacy}","received_events_url":"https://api.github.com/users/msarahan/received_events","type":"User","site_admin":false},"created_at":"2016-07-29T00:59:55Z","updated_at":"2016-07-29T00:59:55Z","body":"Excellent! Thanks for your patience in discussing this. I will ping you on the pr that adds that environment variable. "}}
{"actor":{"display_login":"msarahan"}}