diff options
Diffstat (limited to 'xmake')
| -rw-r--r-- | xmake/actions/build/statistics.lua | 4 | ||||
| -rw-r--r-- | xmake/core/base/os.lua | 7 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/sandbox/sandbox.lua | 5 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/os.lua | 1 | ||||
| -rw-r--r-- | xmake/plugins/lua/scripts/versioninfo.lua | 27 |
5 files changed, 4 insertions, 40 deletions
diff --git a/xmake/actions/build/statistics.lua b/xmake/actions/build/statistics.lua index 7a04ed27f..804092763 100644 --- a/xmake/actions/build/statistics.lua +++ b/xmake/actions/build/statistics.lua @@ -123,8 +123,8 @@ function main() local releasefile = outputdir .. ".release" if not os.isfile(releasefile) then import("net.http.download") - local version = os.versioninfo().version - download(format("https://github.com/xmake-io/xmake-stats/releases/download/v%d.%d.%d/%s", version.major, version.minor, version.alter, os.host()), releasefile) + local xmakever = xmake.version() + download(format("https://github.com/xmake-io/xmake-stats/releases/download/v%d.%d.%d/%s", xmakever:major(), xmakever:minor(), xmakever:patch(), os.host()), releasefile) print("post to releases ok!") end diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 891fd4227..8b9e9dbb5 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -37,7 +37,6 @@ os._rmdir = os._rmdir or os.rmdir os._tmpdir = os._tmpdir or os.tmpdir os._setenv = os._setenv or os.setenv os._readlink = os._readlink or os.readlink -os._versioninfo = os._versioninfo or os.versioninfo -- copy single file or directory function os._cp(src, dst) @@ -978,11 +977,5 @@ function os.projectfile() return xmake._PROJECT_FILE end --- get version info -function os.versioninfo() - os._VERSIONINFO = os._VERSIONINFO or os._versioninfo() - return os._VERSIONINFO -end - -- return module return os diff --git a/xmake/core/sandbox/modules/import/core/sandbox/sandbox.lua b/xmake/core/sandbox/modules/import/core/sandbox/sandbox.lua index 331dbd1de..6bb1b715d 100644 --- a/xmake/core/sandbox/modules/import/core/sandbox/sandbox.lua +++ b/xmake/core/sandbox/modules/import/core/sandbox/sandbox.lua @@ -43,8 +43,7 @@ function sandbox_core_sandbox.interactive() -- load repl history local replhistory = nil - local enable_readline = os.versioninfo().features.readline - if enable_readline then + if readline then -- clear history readline.clear_history() @@ -60,7 +59,7 @@ function sandbox_core_sandbox.interactive() sandbox.interactive(instance._PUBLIC) -- save repl history if readline is enabled - if enable_readline then + if readline then -- save to history local entries = readline.history_list() diff --git a/xmake/core/sandbox/modules/os.lua b/xmake/core/sandbox/modules/os.lua index 342516c01..2634f3a10 100644 --- a/xmake/core/sandbox/modules/os.lua +++ b/xmake/core/sandbox/modules/os.lua @@ -58,7 +58,6 @@ sandbox_os.programdir = os.programdir sandbox_os.programfile = os.programfile sandbox_os.projectdir = os.projectdir sandbox_os.projectfile = os.projectfile -sandbox_os.versioninfo = os.versioninfo sandbox_os.getwinsize = os.getwinsize sandbox_os.user_agent = os.user_agent diff --git a/xmake/plugins/lua/scripts/versioninfo.lua b/xmake/plugins/lua/scripts/versioninfo.lua deleted file mode 100644 index 9eec627a9..000000000 --- a/xmake/plugins/lua/scripts/versioninfo.lua +++ /dev/null @@ -1,27 +0,0 @@ ---!A cross-platform build utility based on Lua --- --- Licensed 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 - 2019, TBOOX Open Source Group. --- --- @author TitanSnow --- @file versioninfo.lua --- - --- dump version info --- --- $ xmake lua versionversion --- -function main() - table.dump(os.versioninfo()) -end |
