diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2020-02-14 09:55:16 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2020-02-14 12:24:49 -0300 |
commit | ebc4fc84c0a9eb878192d1db51e5acc61610be45 (patch) | |
tree | b33245e37c11c961cacc8785f00ad1a50ceebc9d /src | |
parent | bd27d052eaf856bf24c77f556a50b7e19f11cba1 (diff) | |
download | luarocks-ebc4fc84c0a9eb878192d1db51e5acc61610be45.tar.gz luarocks-ebc4fc84c0a9eb878192d1db51e5acc61610be45.tar.bz2 luarocks-ebc4fc84c0a9eb878192d1db51e5acc61610be45.zip |
make: support --only-deps
Closes #1156.
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/cmd/make.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/luarocks/cmd/make.lua b/src/luarocks/cmd/make.lua index 2db6c403..60a0f11e 100644 --- a/src/luarocks/cmd/make.lua +++ b/src/luarocks/cmd/make.lua | |||
@@ -62,9 +62,6 @@ commands. See the help on those for details. | |||
62 | If the current directory contains a luarocks.lock file, it is used as the | 62 | If the current directory contains a luarocks.lock file, it is used as the |
63 | authoritative source for exact version of dependencies. The --pin flag | 63 | authoritative source for exact version of dependencies. The --pin flag |
64 | overrides and recreates this file scanning dependency based on ranges. | 64 | overrides and recreates this file scanning dependency based on ranges. |
65 | |||
66 | NB: Use `luarocks install` with the `--only-deps` flag if you want to install | ||
67 | only dependencies of the rockspec (see `luarocks help install`). | ||
68 | ]], util.see_also()) | 65 | ]], util.see_also()) |
69 | :summary("Compile package in current directory using a rockspec.") | 66 | :summary("Compile package in current directory using a rockspec.") |
70 | 67 | ||
@@ -102,7 +99,7 @@ function make.command(args) | |||
102 | need_to_fetch = false, | 99 | need_to_fetch = false, |
103 | minimal_mode = true, | 100 | minimal_mode = true, |
104 | deps_mode = deps.get_deps_mode(args), | 101 | deps_mode = deps.get_deps_mode(args), |
105 | build_only_deps = false, | 102 | build_only_deps = not not (args.only_deps and not args.pack_binary_rock), |
106 | namespace = namespace, | 103 | namespace = namespace, |
107 | branch = args.branch, | 104 | branch = args.branch, |
108 | verify = not not args.verify, | 105 | verify = not not args.verify, |
@@ -129,6 +126,12 @@ function make.command(args) | |||
129 | if not ok then return nil, err end | 126 | if not ok then return nil, err end |
130 | local name, version = ok, err | 127 | local name, version = ok, err |
131 | 128 | ||
129 | if opts.build_only_deps then | ||
130 | util.printout("Stopping after installing dependencies for " ..name.." "..version) | ||
131 | util.printout() | ||
132 | return name, version | ||
133 | end | ||
134 | |||
132 | if args.no_doc then | 135 | if args.no_doc then |
133 | util.remove_doc_dir(name, version) | 136 | util.remove_doc_dir(name, version) |
134 | end | 137 | end |