aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2017-12-01 14:04:26 -0200
committerHisham Muhammad <hisham@gobolinux.org>2017-12-01 14:04:26 -0200
commitfd4cdba61e51a949b56fa94591d06cb21b906b98 (patch)
tree59b65a249672bcba7c55e924fc6ba94cd823e3e8
parentb23ecc01544ff4c592c5f8912327b644043676ce (diff)
downloadluarocks-fd4cdba61e51a949b56fa94591d06cb21b906b98.tar.gz
luarocks-fd4cdba61e51a949b56fa94591d06cb21b906b98.tar.bz2
luarocks-fd4cdba61e51a949b56fa94591d06cb21b906b98.zip
Use 'dev' instead of 'scm'.
Match terminology used in luarocks.org. 'scm' is still supported for compatibility reasons, but is no longer the recommended term.
-rw-r--r--src/luarocks/cmd/build.lua2
-rw-r--r--src/luarocks/cmd/make.lua2
-rw-r--r--src/luarocks/cmd/upload.lua6
-rw-r--r--src/luarocks/cmd/write_rockspec.lua6
-rw-r--r--src/luarocks/core/cfg.lua2
5 files changed, 11 insertions, 7 deletions
diff --git a/src/luarocks/cmd/build.lua b/src/luarocks/cmd/build.lua
index 904a7298..0d969ff6 100644
--- a/src/luarocks/cmd/build.lua
+++ b/src/luarocks/cmd/build.lua
@@ -33,7 +33,7 @@ or the name of a rock to be fetched from a repository.
33 33
34--branch=<name> Override the `source.branch` field in the loaded 34--branch=<name> Override the `source.branch` field in the loaded
35 rockspec. Allows to specify a different branch to 35 rockspec. Allows to specify a different branch to
36 fetch. Particularly for SCM rocks. 36 fetch. Particularly for "dev" rocks.
37 37
38--only-deps Installs only the dependencies of the rock. 38--only-deps Installs only the dependencies of the rock.
39 39
diff --git a/src/luarocks/cmd/make.lua b/src/luarocks/cmd/make.lua
index bfdddb37..8f01856e 100644
--- a/src/luarocks/cmd/make.lua
+++ b/src/luarocks/cmd/make.lua
@@ -45,7 +45,7 @@ only dependencies of the rockspec (see `luarocks help install`).
45 45
46--branch=<name> Override the `source.branch` field in the loaded 46--branch=<name> Override the `source.branch` field in the loaded
47 rockspec. Allows to specify a different branch to 47 rockspec. Allows to specify a different branch to
48 fetch. Particularly for SCM rocks. 48 fetch. Particularly for "dev" rocks.
49 49
50]] 50]]
51 51
diff --git a/src/luarocks/cmd/upload.lua b/src/luarocks/cmd/upload.lua
index baee47ab..a0b69447 100644
--- a/src/luarocks/cmd/upload.lua
+++ b/src/luarocks/cmd/upload.lua
@@ -20,6 +20,10 @@ upload.help = [[
20 increment the revision number instead. 20 increment the revision number instead.
21]] 21]]
22 22
23local function is_dev_version(version)
24 return version:match("^dev") or version:match("^scm")
25end
26
23function upload.command(flags, fname) 27function upload.command(flags, fname)
24 if not fname then 28 if not fname then
25 return nil, "Missing rockspec. "..util.see_help("upload") 29 return nil, "Missing rockspec. "..util.see_help("upload")
@@ -53,7 +57,7 @@ function upload.command(flags, fname)
53 end 57 end
54 58
55 local rock_fname 59 local rock_fname
56 if not flags["skip-pack"] and not rockspec.version:match("^scm") then 60 if not flags["skip-pack"] and not is_dev_version(rockspec.version) then
57 util.printout("Packing " .. tostring(rockspec.package)) 61 util.printout("Packing " .. tostring(rockspec.package))
58 rock_fname, err = pack.pack_source_rock(fname) 62 rock_fname, err = pack.pack_source_rock(fname)
59 if not rock_fname then 63 if not rock_fname then
diff --git a/src/luarocks/cmd/write_rockspec.lua b/src/luarocks/cmd/write_rockspec.lua
index 06d50c69..edb4de3d 100644
--- a/src/luarocks/cmd/write_rockspec.lua
+++ b/src/luarocks/cmd/write_rockspec.lua
@@ -21,7 +21,7 @@ second one is the location.
21If only one argument is given, it must be the location. 21If only one argument is given, it must be the location.
22If no arguments are given, current directory is used as location. 22If no arguments are given, current directory is used as location.
23LuaRocks will attempt to infer name and version if not given, 23LuaRocks will attempt to infer name and version if not given,
24using 'scm' as default version. 24using 'dev' as a fallback default version.
25 25
26Note that the generated file is a _starting point_ for writing a 26Note that the generated file is a _starting point_ for writing a
27rockspec, and is not guaranteed to be complete or correct. 27rockspec, and is not guaranteed to be complete or correct.
@@ -261,7 +261,7 @@ function write_rockspec.command(flags, name, version, url_or_dir)
261 if not name then 261 if not name then
262 return nil, "Could not infer rock name. "..util.see_help("write_rockspec") 262 return nil, "Could not infer rock name. "..util.see_help("write_rockspec")
263 end 263 end
264 version = version or "scm" 264 version = version or "dev"
265 265
266 local filename = flags["output"] or dir.path(fs.current_dir(), name:lower().."-"..version.."-1.rockspec") 266 local filename = flags["output"] or dir.path(fs.current_dir(), name:lower().."-"..version.."-1.rockspec")
267 267
@@ -296,7 +296,7 @@ function write_rockspec.command(flags, name, version, url_or_dir)
296 rockspec.source.file = dir.base_name(url_or_dir) 296 rockspec.source.file = dir.base_name(url_or_dir)
297 rockspec.source.dir = "dummy" 297 rockspec.source.dir = "dummy"
298 if not fetch.is_basic_protocol(rockspec.source.protocol) then 298 if not fetch.is_basic_protocol(rockspec.source.protocol) then
299 if version ~= "scm" then 299 if version ~= "dev" then
300 rockspec.source.tag = flags["tag"] or "v" .. version 300 rockspec.source.tag = flags["tag"] or "v" .. version
301 end 301 end
302 end 302 end
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua
index f22acbb4..e6351add 100644
--- a/src/luarocks/core/cfg.lua
+++ b/src/luarocks/core/cfg.lua
@@ -30,7 +30,7 @@ local persist = require("luarocks.core.persist")
30local require = nil 30local require = nil
31-------------------------------------------------------------------------------- 31--------------------------------------------------------------------------------
32 32
33cfg.program_version = "scm" 33cfg.program_version = "dev"
34cfg.program_series = "3.0" 34cfg.program_series = "3.0"
35cfg.major_version = (cfg.program_version:match("([^.]%.[^.])")) or cfg.program_series 35cfg.major_version = (cfg.program_version:match("([^.]%.[^.])")) or cfg.program_series
36cfg.variables = {} 36cfg.variables = {}