diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-09-07 01:07:38 +0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-09-07 02:42:15 +0300 |
commit | 8840171407a17a6237e193fde3d6a3cc8aee1c4e (patch) | |
tree | 7c3fd825f9af121171bbb1b7c59ba964bf5c5e6c /src | |
parent | ea49b058fb0a2f48ab8b3e3aa2879bbd01a412c9 (diff) | |
download | luarocks-8840171407a17a6237e193fde3d6a3cc8aee1c4e.tar.gz luarocks-8840171407a17a6237e193fde3d6a3cc8aee1c4e.tar.bz2 luarocks-8840171407a17a6237e193fde3d6a3cc8aee1c4e.zip |
write_rockspec, init: rename --lua-version to --lua-versions
Fixes conflict between the use of --lua-version in write_rockspec
to list supported Lua versions in a rockspec (now renamed
to --lua-versions) and the general --lua-version flag used to
select a Lua interpreter.
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/cmd/init.lua | 2 | ||||
-rw-r--r-- | src/luarocks/cmd/write_rockspec.lua | 6 | ||||
-rw-r--r-- | src/luarocks/util.lua | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/luarocks/cmd/init.lua b/src/luarocks/cmd/init.lua index a9511316..0138c056 100644 --- a/src/luarocks/cmd/init.lua +++ b/src/luarocks/cmd/init.lua | |||
@@ -19,7 +19,7 @@ init.help = [[ | |||
19 | --summary="<txt>" A short one-line description summary. | 19 | --summary="<txt>" A short one-line description summary. |
20 | --detailed="<txt>" A longer description string. | 20 | --detailed="<txt>" A longer description string. |
21 | --homepage=<url> Project homepage. | 21 | --homepage=<url> Project homepage. |
22 | --lua-version=<ver> Supported Lua versions. Accepted values are "5.1", "5.2", | 22 | --lua-versions=<ver> Supported Lua versions. Accepted values are "5.1", "5.2", |
23 | "5.3", "5.1,5.2", "5.2,5.3", or "5.1,5.2,5.3". | 23 | "5.3", "5.1,5.2", "5.2,5.3", or "5.1,5.2,5.3". |
24 | --rockspec-format=<ver> Rockspec format version, such as "1.0" or "1.1". | 24 | --rockspec-format=<ver> Rockspec format version, such as "1.0" or "1.1". |
25 | --lib=<lib>[,<lib>] A comma-separated list of libraries that C files need to | 25 | --lib=<lib>[,<lib>] A comma-separated list of libraries that C files need to |
diff --git a/src/luarocks/cmd/write_rockspec.lua b/src/luarocks/cmd/write_rockspec.lua index 701b079e..4a8a997e 100644 --- a/src/luarocks/cmd/write_rockspec.lua +++ b/src/luarocks/cmd/write_rockspec.lua | |||
@@ -33,7 +33,7 @@ rockspec, and is not guaranteed to be complete or correct. | |||
33 | --summary="<txt>" A short one-line description summary. | 33 | --summary="<txt>" A short one-line description summary. |
34 | --detailed="<txt>" A longer description string. | 34 | --detailed="<txt>" A longer description string. |
35 | --homepage=<url> Project homepage. | 35 | --homepage=<url> Project homepage. |
36 | --lua-version=<ver> Supported Lua versions. Accepted values are: "5.1", "5.2", | 36 | --lua-versions=<ver> Supported Lua versions. Accepted values are: "5.1", "5.2", |
37 | "5.3", "5.4", "5.1,5.2", "5.2,5.3", "5.3,5.4", "5.1,5.2,5.3", | 37 | "5.3", "5.4", "5.1,5.2", "5.2,5.3", "5.3,5.4", "5.1,5.2,5.3", |
38 | "5.2,5.3,5.4", or "5.1,5.2,5.3,5.4" | 38 | "5.2,5.3,5.4", or "5.1,5.2,5.3,5.4" |
39 | --rockspec-format=<ver> Rockspec format version, such as "1.0" or "1.1". | 39 | --rockspec-format=<ver> Rockspec format version, such as "1.0" or "1.1". |
@@ -283,7 +283,7 @@ function write_rockspec.command(flags, name, version, url_or_dir) | |||
283 | license = flags["license"] or "*** please specify a license ***", | 283 | license = flags["license"] or "*** please specify a license ***", |
284 | }, | 284 | }, |
285 | dependencies = { | 285 | dependencies = { |
286 | lua_version_dep[flags["lua-version"]], | 286 | lua_version_dep[flags["lua-versions"]], |
287 | }, | 287 | }, |
288 | build = {}, | 288 | build = {}, |
289 | }) | 289 | }) |
@@ -291,7 +291,7 @@ function write_rockspec.command(flags, name, version, url_or_dir) | |||
291 | rockspec.source.protocol = protocol | 291 | rockspec.source.protocol = protocol |
292 | 292 | ||
293 | if not next(rockspec.dependencies) then | 293 | if not next(rockspec.dependencies) then |
294 | util.warning("Please specify supported Lua version with --lua-version=<ver>. "..util.see_help("write_rockspec")) | 294 | util.warning("Please specify supported Lua versions with --lua-versions=<ver>. "..util.see_help("write_rockspec")) |
295 | end | 295 | end |
296 | 296 | ||
297 | local local_dir = url_or_dir | 297 | local local_dir = url_or_dir |
diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua index e65128da..4be7d71e 100644 --- a/src/luarocks/util.lua +++ b/src/luarocks/util.lua | |||
@@ -117,6 +117,7 @@ local supported_flags = { | |||
117 | ["lr-path"] = true, | 117 | ["lr-path"] = true, |
118 | ["lua-dir"] = "<path>", | 118 | ["lua-dir"] = "<path>", |
119 | ["lua-version"] = "<vers>", | 119 | ["lua-version"] = "<vers>", |
120 | ["lua-versions"] = "<versions>", | ||
120 | ["lua-ver"] = true, | 121 | ["lua-ver"] = true, |
121 | ["lua-incdir"] = true, | 122 | ["lua-incdir"] = true, |
122 | ["lua-libdir"] = true, | 123 | ["lua-libdir"] = true, |