keplerproject/luarocks — pull request #226 by Tieske (2014-01-28 21:45:25+00:00)
Title: add --branch=<branchname> option

adds a `--branch=` option. The branchename is passed as `BRANCH` to the rockspec environment.

The following now works to install a branch using the `--branch` option, or `master` if not specified
```lua
local tag = BRANCH or "master"
source = {
url = "http://github.com/Tieske/rpi-gpio/archive/"..tag..".zip",
dir = "rpi-gpio-"..tag,
}
````

It is not yet contained to SCM rockspecs only. Any advice on how to do that? is just checking the rockspec name for "-SCM-" enough? or is there another (already parsed) field that can be used?