From 1d42a2af12f2274cac20717c753197e9f86139e3 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 24 Aug 2022 11:55:24 +0300 Subject: [PATCH] refactor(build): Tweak dev rockspec with format 3 features Also normalize a bit with some niceties from other lunarmodules projects that make it a little easier to cut releases without missing things. --- luacheck-dev-1.rockspec | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/luacheck-dev-1.rockspec b/luacheck-dev-1.rockspec index bfb0805c..e653c2fd 100644 --- a/luacheck-dev-1.rockspec +++ b/luacheck-dev-1.rockspec @@ -1,23 +1,44 @@ -package = "luacheck" -version = "dev-1" +local package_name = "luacheck" +local package_version = "dev" +local rockspec_revision = "1" +local github_account_name = "lunarmodules" +local github_repo_name = package_name + +rockspec_format = "3.0" +package = package_name +version = package_version .. "-" .. rockspec_revision + source = { - url = "git+https://github.com/lunarmodules/luacheck.git" + url = "git+https://github.com/" .. github_account_name .. "/" .. github_repo_name .. ".git" } + +if package_version == "dev" then source.branch = "master" else source.tag = "v" .. package_version end + description = { summary = "A static analyzer and a linter for Lua", detailed = [[ -Luacheck is a command-line tool for linting and static analysis of Lua code. -It is able to spot usage of undefined global variables, unused local variables and -a few other typical problems within Lua programs. -]], + Luacheck is a command-line tool for linting and static analysis of Lua + code. It is able to spot usage of undefined global variables, unused + local variables and a few other typical problems within Lua programs. + ]], homepage = "https://github.com/lunarmodules/luacheck", license = "MIT" } + dependencies = { "lua >= 5.1", "argparse >= 0.6.0", "luafilesystem >= 1.6.3" } + +test_dependencies = { + "busted", +} + +test = { + type = "busted", +} + build = { type = "builtin", modules = {