summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-03-01 16:35:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-03-01 16:35:33 +0800
commit1eab1e0ed18697304619b0e1ec15064a155aa772 (patch)
tree5eeb70ff0dbbc11052807d32f8a82413b1ee7fed
parent86e1e3b431687c62e29c6f5955992cd9bd77a387 (diff)
downloadlua-language-server-1eab1e0ed18697304619b0e1ec15064a155aa772.zip
cleanup
-rw-r--r--main.lua7
-rw-r--r--script/ci/init.lua4
-rw-r--r--script/ci/version.lua2
3 files changed, 8 insertions, 5 deletions
diff --git a/main.lua b/main.lua
index 09f379dd..ae987ea5 100644
--- a/main.lua
+++ b/main.lua
@@ -34,11 +34,6 @@ ROOT = fs.path(util.expandPath(rootPath))
LOGPATH = LOGPATH and util.expandPath(LOGPATH) or (ROOT:string() .. '/log')
METAPATH = METAPATH and util.expandPath(METAPATH) or (ROOT:string() .. '/meta')
-if _G['VERSION'] then
- print(version.getVersion())
- return
-end
-
---@diagnostic disable-next-line: deprecated
debug.setcstacklimit(200)
--collectgarbage('generational', 5, 25)
@@ -53,6 +48,8 @@ log.debug('LOGPATH:', LOGPATH)
log.debug('METAPATH:', METAPATH)
log.debug('VERSION:', version.getVersion())
+require 'ci'
+
require 'tracy'
xpcall(dofile, log.debug, (ROOT / 'debugger.lua'):string())
diff --git a/script/ci/init.lua b/script/ci/init.lua
new file mode 100644
index 00000000..8d2a4e15
--- /dev/null
+++ b/script/ci/init.lua
@@ -0,0 +1,4 @@
+if _G['VERSION'] then
+ require 'ci.version'
+ os.exit(0, true)
+end
diff --git a/script/ci/version.lua b/script/ci/version.lua
new file mode 100644
index 00000000..03926c28
--- /dev/null
+++ b/script/ci/version.lua
@@ -0,0 +1,2 @@
+local version = require 'version'
+print(version.getVersion())