aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV1K1NGbg <victor@ilchev.com>2024-07-29 19:54:51 +0300
committerV1K1NGbg <victor@ilchev.com>2024-08-05 20:51:31 +0300
commitb2c2ed5ea350bdbb112adf6c5abd70afecdec028 (patch)
tree49028093629e546c9d57c51b84704aa42cb5cca2
parentcc1bf05cf7da216c3ac01d2db2f54109c57b3499 (diff)
downloadluarocks-b2c2ed5ea350bdbb112adf6c5abd70afecdec028.tar.gz
luarocks-b2c2ed5ea350bdbb112adf6c5abd70afecdec028.tar.bz2
luarocks-b2c2ed5ea350bdbb112adf6c5abd70afecdec028.zip
completely removing build.opts
-rw-r--r--src/luarocks/cmd/build.lua6
-rw-r--r--src/luarocks/cmd/make.lua4
2 files changed, 4 insertions, 6 deletions
diff --git a/src/luarocks/cmd/build.lua b/src/luarocks/cmd/build.lua
index 8049596f..b46b9532 100644
--- a/src/luarocks/cmd/build.lua
+++ b/src/luarocks/cmd/build.lua
@@ -51,7 +51,6 @@ end
51-- or false and an error message and an optional error code. 51-- or false and an error message and an optional error code.
52local function build_rock(rock_filename, opts) 52local function build_rock(rock_filename, opts)
53 assert(type(rock_filename) == "string") 53 assert(type(rock_filename) == "string")
54 assert(opts:type() == "build.opts")
55 54
56 local cwd = fs.absolute_name(dir.path(".")) 55 local cwd = fs.absolute_name(dir.path("."))
57 56
@@ -84,7 +83,6 @@ local function do_build(name, namespace, version, opts)
84 assert(type(name) == "string") 83 assert(type(name) == "string")
85 assert(type(namespace) == "string" or not namespace) 84 assert(type(namespace) == "string" or not namespace)
86 assert(version == nil or type(version) == "string") 85 assert(version == nil or type(version) == "string")
87 assert(opts:type() == "build.opts")
88 86
89 local url, err 87 local url, err
90 if name:match("%.rockspec$") or name:match("%.rock$") then 88 if name:match("%.rockspec$") or name:match("%.rock$") then
@@ -132,7 +130,7 @@ function cmd_build.command(args)
132 return make.command(args) 130 return make.command(args)
133 end 131 end
134 132
135 local opts = build.opts({ 133 local opts = {
136 need_to_fetch = true, 134 need_to_fetch = true,
137 minimal_mode = false, 135 minimal_mode = false,
138 deps_mode = deps.get_deps_mode(args), 136 deps_mode = deps.get_deps_mode(args),
@@ -144,7 +142,7 @@ function cmd_build.command(args)
144 pin = not not args.pin, 142 pin = not not args.pin,
145 rebuild = not not (args.force or args.force_fast), 143 rebuild = not not (args.force or args.force_fast),
146 no_install = false 144 no_install = false
147 }) 145 }
148 146
149 if args.sign and not args.pack_binary_rock then 147 if args.sign and not args.pack_binary_rock then
150 return nil, "In the build command, --sign is meant to be used only with --pack-binary-rock" 148 return nil, "In the build command, --sign is meant to be used only with --pack-binary-rock"
diff --git a/src/luarocks/cmd/make.lua b/src/luarocks/cmd/make.lua
index ffec8c5d..e7db6aad 100644
--- a/src/luarocks/cmd/make.lua
+++ b/src/luarocks/cmd/make.lua
@@ -99,7 +99,7 @@ function make.command(args)
99 local name, namespace = util.split_namespace(rockspec.name) 99 local name, namespace = util.split_namespace(rockspec.name)
100 namespace = namespace or args.namespace 100 namespace = namespace or args.namespace
101 101
102 local opts = build.opts({ 102 local opts = {
103 need_to_fetch = false, 103 need_to_fetch = false,
104 minimal_mode = true, 104 minimal_mode = true,
105 deps_mode = deps.get_deps_mode(args), 105 deps_mode = deps.get_deps_mode(args),
@@ -111,7 +111,7 @@ function make.command(args)
111 pin = not not args.pin, 111 pin = not not args.pin,
112 rebuild = true, 112 rebuild = true,
113 no_install = not not args.no_install 113 no_install = not not args.no_install
114 }) 114 }
115 115
116 if args.sign and not args.pack_binary_rock then 116 if args.sign and not args.pack_binary_rock then
117 return nil, "In the make command, --sign is meant to be used only with --pack-binary-rock" 117 return nil, "In the make command, --sign is meant to be used only with --pack-binary-rock"