summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-06-02 00:38:35 +0800
committerruki <[email protected]>2021-06-02 00:38:35 +0800
commita95ee75af458c25f8155ecf23657b6571c9b067e (patch)
tree53585533dd339154b7bbb1756c03a787533ce1f7
parent171780c824fdacef1173f6363c8c173b9906ab9d (diff)
improve package task menu
-rw-r--r--xmake/actions/package/xmake.lua41
1 files changed, 15 insertions, 26 deletions
diff --git a/xmake/actions/package/xmake.lua b/xmake/actions/package/xmake.lua
index d30815a98..67d98aa7b 100644
--- a/xmake/actions/package/xmake.lua
+++ b/xmake/actions/package/xmake.lua
@@ -18,36 +18,25 @@
-- @file xmake.lua
--
--- define task
task("package")
-
- -- set category
set_category("action")
-
- -- on run
on_run("main")
-
- -- set menu
set_menu {
- -- usage
- usage = "xmake package|p [options] [target]"
-
- -- description
- , description = "Package target."
-
- -- xmake p
- , shortname = 'p'
-
- -- options
- , options =
- {
- {'o', "outputdir", "kv", nil , "Set the output directory." }
- , {'a', "all", "k", nil , "Package all targets." }
- , {}
- , {nil, "target", "v", nil , "The target name. It will package all default targets if this parameter is not specified."
- , values = function (complete, opt) return import("private.utils.complete_helper.targets")(complete, opt) end }
- }
- }
+ usage = "xmake package|p [options] [target]",
+ description = "Package target.",
+ shortname = 'p',
+ options = {
+ {'o', "outputdir", "kv", nil, "Set the output directory."},
+ {'a', "all", "k", nil, "Package all targets."},
+ {'f', "format", "kv", "local", "Set the package format.",
+ values = {"dotpkg", "local"}},
+ {},
+ {nil, "target", "v", nil, "The target name. It will package all default targets if this parameter is not specified.",
+ values = function (complete, opt)
+ return import("private.utils.complete_helper.targets")(complete, opt)
+ end }
+ }
+ }