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(-) 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