lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I created an SCM rockspec containing this code;

> local tag = "master"
> source = {
>     url = "http://github.com/Tieske/rpi-gpio/archive/"..tag..".zip";,
>     dir = "rpi-gpio-master",
> }

This obvoiously always fetches the `master` branch.

Question: is there a way I could set this up so I could pass the name of the branch on the luarocks command line?

Something like;
> local tag = cmdln.vars.branch or "master"
> source = {
>     url = "http://github.com/Tieske/rpi-gpio/archive/"..tag..".zip";,
>     dir = "rpi-gpio-master",
> }

And the use something like;
> Sudo luarocks install https://path/to/rockspec branch=newdevelopment

To get the 'newdevelopment' branch installed.

Thx.
Thijs