add - Add a rock or rockspec to a rocks server.
Usage
- luarocks-admin add [--to=server] [--no-refresh] {rockspec|rock}
Argument may be a local rockspec or rock file. The flag --to indicates which server to use. If not given, the default server set in the upload_server variable from the configuration file is used instead. You need to either explicitly pass a full URL to --to or configure an upload server in your configuration file prior to using the "add" function.
The flag --no-refresh indicates the local cache should not be refreshed prior to generation of the updated manifest.
Example
Basic example
Add a rockspec to your default configured upload server:
luarocks-admin add lpeg-0.9-1.rockspec
Handling multiple repositories
Assuming your ~/.luarocks/config.lua file looks like this:
upload_server = "main"
upload_servers = {
main = {
http = "www.example.com/repos/main",
sftp = "myuser@example.com/var/www/repos/main"
},
dev = {
http = "www.example.com/repos/devel-rocks",
sftp = "myuser@example.com/var/www/repos/devel-rocks"
},
}
you can specify which repository to use with the --to flag:
luarocks-admin add --to=dev my_rock-scm-1.rockspec