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

publish to `Open VSX`

parent 11d9bbc2
No related branches found
No related tags found
No related merge requests found
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
/client/out/*.map /client/out/*.map
/publish/ /publish/
/luadoc/out/ /luadoc/out/
/ovsx-token
...@@ -202,53 +202,56 @@ for i = 5, 0, -1 do ...@@ -202,53 +202,56 @@ for i = 5, 0, -1 do
thread.sleep(1) thread.sleep(1)
end end
local vsix = ROOT / 'publish' / ('lua-' .. version .. '.vsix') local function shell(command)
local p, err = subprocess.shell { command.cwd = out
'vsce', 'package', command.stdout = true
'-o', vsix, command.stderr = true
cwd = out, local p, err = subprocess.shell(command)
stderr = true,
}
if not p then if not p then
error(err) error(err)
end end
p:wait() p:wait()
print(p.stdout:read 'a')
print(p.stderr:read 'a') print(p.stderr:read 'a')
end
local p =subprocess.shell { local vsix = ROOT / 'publish' / ('lua-' .. version .. '.vsix')
shell {
'vsce', 'package',
'-o', vsix,
}
shell {
'git', 'add', '*', 'git', 'add', '*',
} }
p:wait()
local p = subprocess.shell { shell {
'git', 'commit', '-m', tostring(version), 'git', 'commit', '-m', tostring(version),
} }
p:wait()
local p = subprocess.shell { shell {
'git', 'tag', 'v' .. tostring(version), 'git', 'tag', 'v' .. tostring(version),
} }
p:wait()
local p = subprocess.shell { shell {
'git', 'push', 'git', 'push',
} }
p:wait()
local p = subprocess.shell { shell {
'git', 'push', '--tags', 'git', 'push', '--tags',
} }
p:wait()
local p, err = subprocess.shell { shell {
'vsce', 'publish', 'vsce', 'publish',
cwd = out,
stderr = true,
stdout = true,
} }
if not p then
error(err) local ovsxToken = fsu.loadFile(ROOT / 'ovsx-token')
if ovsxToken then
ovsxToken = ovsxToken:match '[%w%-]+'
shell {
'npx', 'ovsx', 'plublish', vsix,
'-p', ovsxToken
}
end end
p:wait()
print('完成') print('完成')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment