{"action":"created","issue":{"url":"https://api.github.com/repos/middleman/middleman/issues/1446","labels_url":"https://api.github.com/repos/middleman/middleman/issues/1446/labels{/name}","comments_url":"https://api.github.com/repos/middleman/middleman/issues/1446/comments","events_url":"https://api.github.com/repos/middleman/middleman/issues/1446/events","html_url":"https://github.com/middleman/middleman/issues/1446","id":57267159,"number":1446,"title":"external setting build_dir","user":{"login":"vasco","id":87291,"avatar_url":"https://avatars.githubusercontent.com/u/87291?v=3","gravatar_id":"","url":"https://api.github.com/users/vasco","html_url":"https://github.com/vasco","followers_url":"https://api.github.com/users/vasco/followers","following_url":"https://api.github.com/users/vasco/following{/other_user}","gists_url":"https://api.github.com/users/vasco/gists{/gist_id}","starred_url":"https://api.github.com/users/vasco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasco/subscriptions","organizations_url":"https://api.github.com/users/vasco/orgs","repos_url":"https://api.github.com/users/vasco/repos","events_url":"https://api.github.com/users/vasco/events{/privacy}","received_events_url":"https://api.github.com/users/vasco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-11T02:00:43Z","updated_at":"2015-02-11T16:14:17Z","closed_at":null,"body":"I run/use middleman as a stage of a \"bigger\" project compilation (e.g. the project also compiles GWT). The build is controlled by maven, which in turn have a goal/mojo that calls middleman. The output directory (\"build_dir\" variable/instruction) must be controlled by maven.\r\n\r\nWe are doing this by having an instruction in config.rb like:\r\n```ruby\r\nset :build_dir, ENV['MM_BUILD_DIR']\r\n```\r\n\r\nHowever it bothers me to have an explicit instruction to set the build_dir. Do you have alternatives?\r\n\r\nIf we did a PR to allow the build_dir to be set by an external variable, it would be accepted? Is this aligned with \"middleman's vision\"?"},"comment":{"url":"https://api.github.com/repos/middleman/middleman/issues/comments/73908999","html_url":"https://github.com/middleman/middleman/issues/1446#issuecomment-73908999","issue_url":"https://api.github.com/repos/middleman/middleman/issues/1446","id":73908999,"user":{"login":"vasco","id":87291,"avatar_url":"https://avatars.githubusercontent.com/u/87291?v=3","gravatar_id":"","url":"https://api.github.com/users/vasco","html_url":"https://github.com/vasco","followers_url":"https://api.github.com/users/vasco/followers","following_url":"https://api.github.com/users/vasco/following{/other_user}","gists_url":"https://api.github.com/users/vasco/gists{/gist_id}","starred_url":"https://api.github.com/users/vasco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasco/subscriptions","organizations_url":"https://api.github.com/users/vasco/orgs","repos_url":"https://api.github.com/users/vasco/repos","events_url":"https://api.github.com/users/vasco/events{/privacy}","received_events_url":"https://api.github.com/users/vasco/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T16:14:17Z","updated_at":"2015-02-11T16:14:17Z","body":"It's the fact that you have to do things in your project (\"set :build_dir, ENV['MM_BUILD_DIR']\") to have that flexibility.\r\n\r\nFor example, to set the environment (e.g. development, staging, production), you don't have to do any instruction in the config.rb. You run the command with the environment you want to run in, and middleman understands that, setting the necessary variables to allow that compilation to happen for that particular environment. It would be odd for me to be forced to have to do:\r\n```ruby\r\nset :environment, ENV['MM_ENV']\r\n````\r\n\r\nMy point would be to apply the same type of rationals to the build directory: Be able to set it in the \"command line\" without having to particularize my config.rb file for that matter."}}