leafo/heroku-buildpack-lua — pull request #5 by vdel26 (2014-10-24 16:25:56+00:00)
Title: Persist $STACK env variable

Otherwise this variable is only available during the buildpack compile step (see: https://devcenter.heroku.com/articles/buildpack-api#stacks)
It is useful to have it always available so that an application can be deployed in a different way based on the stack.