Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
vscode-lua-srb2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LJ Sonic
vscode-lua-srb2
Commits
7a155081
Commit
7a155081
authored
4 years ago
by
最萌小汐
Browse files
Options
Downloads
Patches
Plain Diff
暂时先这样吧
parent
39b3d466
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
publish.lua
+39
-9
39 additions, 9 deletions
publish.lua
with
39 additions
and
9 deletions
publish.lua
+
39
−
9
View file @
7a155081
...
@@ -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'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment