diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-08-28 20:54:34 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-08-28 20:54:34 +0800 |
commit | 2d25c889f7197124c28a91bc5c4ce3b4303aa61c (patch) | |
tree | 60704c9bbf831bba8a377fae865fca0f7a9828e7 /server/publish.lua | |
parent | 1c7f461c70fbcf6937097e55aae0fc1ff0645f65 (diff) | |
download | lua-language-server-2d25c889f7197124c28a91bc5c4ce3b4303aa61c.zip |
整理发布
Diffstat (limited to 'server/publish.lua')
-rw-r--r-- | server/publish.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/server/publish.lua b/server/publish.lua index 149d54d6..94a2521a 100644 --- a/server/publish.lua +++ b/server/publish.lua @@ -10,8 +10,9 @@ package.path = rootPath .. 'src/?.lua' local fs = require 'bee.filesystem' local subprocess = require 'bee.subprocess' +local platform = require 'bee.platform' ROOT = fs.absolute(fs.path(rootPath):parent_path()) -EXTENSION = fs.absolute(fs.path(rootPath .. '..')) +EXTENSION = ROOT:parent_path() require 'utility' local json = require 'json' @@ -77,10 +78,9 @@ local function copyFiles(root, out) end local function runTest(root) - local is_macos = package.cpath:sub(-3) == '.so' - local ext = is_macos and '' or '.exe' + local ext = platform.OS == 'Windows' and '.exe' or '' local exe = root / 'bin' / 'lua-language-server' .. ext - local test = root / 'test' / 'main.lua' + local test = root / 'test.lua' local lua = subprocess.spawn { exe, test, @@ -150,6 +150,8 @@ local count = copyFiles(EXTENSION , out) { ['src'] = true, ['test'] = true, ['main.lua'] = true, + ['test.lua'] = true, + ['build_package.lua'] = true, }, ['images'] = { ['logo.png'] = true, @@ -172,6 +174,8 @@ removeFiles(out) { ['server'] = { ['log'] = true, ['test'] = true, + ['test.lua'] = true, + ['build_package.lua'] = true, }, } |