zserge / lua-promises

A+ promises in Lua
https://zserge.com/lua-promises/
MIT License
222 stars 35 forks source link

LuaRocks #1

Closed catwell closed 9 years ago

catwell commented 9 years ago

Hello,

any chance you would add a rockspec and put this into LuaRocks?

zserge commented 9 years ago

To be honest, I never used LuaRocks (yet), but I got a similar request for my another Lua library (lua-sh), so I think it's time to learn :) Any hints/guidelines are welcome!

catwell commented 9 years ago

It is very easy for simple libraries like this. The best thing to do is to have two versions of the rock: one with the development version (called SCM) and one for releases. You can find rockspec examples from one of my own libraries here. For stable releases, you can choose to host the source in a tarball like I did for Haricot release 1.0 or just use Git like I did for Haricot release 1.1 (the "branch" can be a simple tag).

Once this is done, register on luarocks.org, install luarocks and use the luarocks upload command. It is not necessary to upload the SCM rock, you can just leave the rockspec on GitHub (it can be installed using the URL for the raw rockspec file).

zserge commented 9 years ago

Thanks for the links! It was really easy. I published the 'scm' variant only, since there is no other versions yet. Seems to be working (I was able to install it via luarocks).

catwell commented 9 years ago

Yes, it works. Users have to specify --server=http://luarocks.org/dev because it is a SCM version, but that is expected. Thank you!