summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-11-10 22:39:14 +0800
committerruki <[email protected]>2018-11-10 22:39:14 +0800
commit53e2cf31fdc5adcb4949b9c54a81527a99d4171a (patch)
tree7f7378efadd7819c5ce5f31515927e74b643dee2
parenta50123ab22c677169a4a5e84d3273688b06ff136 (diff)
add xmake update action
-rw-r--r--xmake/actions/update/main.lua32
-rw-r--r--xmake/actions/update/xmake.lua54
2 files changed, 86 insertions, 0 deletions
diff --git a/xmake/actions/update/main.lua b/xmake/actions/update/main.lua
new file mode 100644
index 000000000..74b78c284
--- /dev/null
+++ b/xmake/actions/update/main.lua
@@ -0,0 +1,32 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015 - 2018, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file main.lua
+--
+
+-- imports
+import("core.base.option")
+
+-- main
+function main()
+
+end
+
diff --git a/xmake/actions/update/xmake.lua b/xmake/actions/update/xmake.lua
new file mode 100644
index 000000000..fa47a2336
--- /dev/null
+++ b/xmake/actions/update/xmake.lua
@@ -0,0 +1,54 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015 - 2018, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file xmake.lua
+--
+
+-- define task
+task("update")
+
+ -- set category
+ set_category("action")
+
+ -- on run
+ on_run("main")
+
+ -- set menu
+ set_menu {
+ -- usage
+ usage = "xmake update [options] [version]"
+
+ -- description
+ , description = "Update and uninstall the xmake program."
+
+ -- options
+ , options =
+ {
+ {'b', "branch", "k", nil, "Update the given branch version." }
+ , {'u', "uninstall", "k", nil, "Uninstall the current xmake program." }
+
+ , { }
+ , {nil, "version", "v", nil, "The given xmake version." }
+ }
+ }
+
+
+