From 741b67beb9b224a409e8b56df16756bea9cb8ecd Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 24 May 2018 17:20:19 +0200 Subject: Whitelist Lua 5.4 --- src/luarocks/core/cfg.lua | 2 +- src/luarocks/util.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua index f036aa44..834dba79 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua @@ -15,7 +15,7 @@ local rawset, next, table, pairs, require, io, os, setmetatable, pcall, ipairs, local cfg = {} -cfg.lua_version = _VERSION:match(" (5%.[123])$") or "5.1" +cfg.lua_version = _VERSION:match(" (5%.[1234])$") or "5.1" local version_suffix = cfg.lua_version:gsub("%.", "_") -- Load site-local global configurations diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua index 7fdefce0..ff36aa50 100644 --- a/src/luarocks/util.lua +++ b/src/luarocks/util.lua @@ -310,7 +310,7 @@ function util.variable_substitutions(tbl, vars) end function util.lua_versions() - local versions = { "5.1", "5.2", "5.3" } + local versions = { "5.1", "5.2", "5.3", "5.4" } local i = 0 return function() i = i + 1 -- cgit v1.2.3-55-g6feb From a6778a07c6669a3a4c15d628d2a2aea453290170 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 24 May 2018 22:47:03 +0200 Subject: write_rockspec: Add support for Lua 5.4 --- src/luarocks/cmd/write_rockspec.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/luarocks/cmd/write_rockspec.lua b/src/luarocks/cmd/write_rockspec.lua index 88223857..53be404c 100644 --- a/src/luarocks/cmd/write_rockspec.lua +++ b/src/luarocks/cmd/write_rockspec.lua @@ -33,8 +33,9 @@ rockspec, and is not guaranteed to be complete or correct. --summary="" A short one-line description summary. --detailed="" A longer description string. --homepage= Project homepage. ---lua-version= Supported Lua versions. Accepted values are "5.1", "5.2", - "5.3", "5.1,5.2", "5.2,5.3", or "5.1,5.2,5.3". +--lua-version= Supported Lua versions. Accepted values are: "5.1", "5.2", + "5.3", "5.4", "5.1,5.2", "5.2,5.3", "5.3,5.4", "5.1,5.2,5.3", + "5.2,5.3,5.4", or "5.1,5.2,5.3,5.4" --rockspec-format= Rockspec format version, such as "1.0" or "1.1". --tag= Tag to use. Will attempt to extract version number from it. --lib=[,] A comma-separated list of libraries that C files need to @@ -68,12 +69,20 @@ local function configure_lua_version(rockspec, luaver) table.insert(rockspec.dependencies, "lua ~> 5.2") elseif luaver == "5.3" then table.insert(rockspec.dependencies, "lua ~> 5.3") + elseif luaver == "5.4" then + table.insert(rockspec.dependencies, "lua ~> 5.4") elseif luaver == "5.1,5.2" then table.insert(rockspec.dependencies, "lua >= 5.1, < 5.3") elseif luaver == "5.2,5.3" then table.insert(rockspec.dependencies, "lua >= 5.2, < 5.4") + elseif luaver == "5.3,5.4" then + table.insert(rockspec.dependencies, "lua >= 5.3, < 5.5") elseif luaver == "5.1,5.2,5.3" then table.insert(rockspec.dependencies, "lua >= 5.1, < 5.4") + elseif luaver == "5.2,5.3,5.4" then + table.insert(rockspec.dependencies, "lua >= 5.2, < 5.5") + elseif luaver == "5.1,5.2,5.3,5.4" then + table.insert(rockspec.dependencies, "lua >= 5.1, < 5.5") else util.warning("Please specify supported Lua version with --lua-version=. "..util.see_help("write_rockspec")) end -- cgit v1.2.3-55-g6feb