Skip to content
Snippets Groups Projects
Commit 7a155081 authored by 最萌小汐's avatar 最萌小汐
Browse files

暂时先这样吧

parent 39b3d466
No related branches found
No related tags found
No related merge requests found
...@@ -4,13 +4,14 @@ if rootPath == '' then ...@@ -4,13 +4,14 @@ if rootPath == '' then
rootPath = './' rootPath = './'
end end
loadfile(rootPath .. 'server/platform.lua')('script') loadfile(rootPath .. 'server/platform.lua')('script')
require 'bee'
local fs = require 'bee.filesystem' local fs = require 'bee.filesystem'
local subprocess = require 'bee.subprocess' local subprocess = require 'bee.subprocess'
local platform = require 'bee.platform' local platform = require 'bee.platform'
local thread = require 'bee.thread'
require 'utility' require 'utility'
dofile(rootPath .. 'server/test.lua') --dofile(rootPath .. 'server/test.lua')
package.path = package.path package.path = package.path
.. ';' .. rootPath .. '/?.lua' .. ';' .. rootPath .. '/?.lua'
...@@ -187,12 +188,41 @@ removeFiles(out) { ...@@ -187,12 +188,41 @@ removeFiles(out) {
}, },
} }
local path = ROOT / 'publish' / 'lua' print('完成')
print('清理发布目录...')
removeFiles(path)(true)
print('复制到发布目录...') for i = 5, 0, -1 do
local count = copyFiles(out, path)(true) print('将在' .. i .. '秒后发布版本:', version)
print(('复制了[%d]个文件'):format(count)) thread.sleep(1)
end
print('完成') local vsix = ROOT / 'publish' / ('lua-' .. version .. '.vsix')
local p, err = subprocess.shell {
'vsce', 'package',
'-o', vsix,
cwd = out,
stderr = true,
}
if not p then
error(err)
end
p:wait()
print(p.stderr:read 'a')
subprocess.shell {
'git', 'tag', 'v' .. tostring(version),
}
subprocess.shell {
'git', 'push', '--tags',
}
local p, err = subprocess.shell {
'vsce', 'publish',
cwd = out,
stderr = true,
}
if not p then
error(err)
end
p:wait()
print(p.stderr:read 'a')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment