Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
srvpro
Commits
d7f0b0d6
Commit
d7f0b0d6
authored
Sep 14, 2015
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
9349e59c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
36 deletions
+35
-36
config.sample.json
config.sample.json
+1
-2
room.coffee
room.coffee
+1
-1
room.js
room.js
+1
-1
ygopro-pre.js
ygopro-pre.js
+32
-32
No files found.
config.sample.json
View file @
d7f0b0d6
...
...
@@ -12,8 +12,7 @@
"enable_TCG_as_default"
:
false
,
"http"
:
{
"port"
:
7922
,
"password"
:
"123456"
,
"match"
:
true
"password"
:
"123456"
},
"pre"
:
{
"port"
:
7911
,
...
...
room.coffee
View file @
d7f0b0d6
...
...
@@ -72,7 +72,7 @@ class Room
@
hostinfo
=
lflist
:
0
rule
:
if
settings
.
modules
.
enable_TCG_as_default
then
0
else
2
rule
:
if
settings
.
modules
.
enable_TCG_as_default
then
2
else
0
mode
:
0
enable_priority
:
false
no_check_deck
:
false
...
...
room.js
View file @
d7f0b0d6
...
...
@@ -90,7 +90,7 @@
Room
.
all
.
push
(
this
);
this
.
hostinfo
=
{
lflist
:
0
,
rule
:
settings
.
modules
.
enable_TCG_as_default
?
0
:
2
,
rule
:
settings
.
modules
.
enable_TCG_as_default
?
2
:
0
,
mode
:
0
,
enable_priority
:
false
,
no_check_deck
:
false
,
...
...
ygopro-pre.js
View file @
d7f0b0d6
...
...
@@ -185,49 +185,49 @@ var loadAllDbs = function() {
//从远程更新数据库,异步
var
fetchDatas
=
function
()
{
var
proc
ess
=
spawn
(
"
git
"
,
[
"
pull
"
,
"
origin
"
],
{
cwd
:
config
.
git_db_path
});
proc
ess
.
stdout
.
setEncoding
(
'
utf8
'
);
proc
ess
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
var
proc
=
spawn
(
"
git
"
,
[
"
pull
"
,
"
origin
"
],
{
cwd
:
config
.
git_db_path
,
env
:
process
.
env
});
proc
.
stdout
.
setEncoding
(
'
utf8
'
);
proc
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
git pull:
"
+
data
);
});
proc
ess
.
stderr
.
setEncoding
(
'
utf8
'
);
proc
ess
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
proc
.
stderr
.
setEncoding
(
'
utf8
'
);
proc
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
git pull error:
"
+
data
);
});
proc
ess
.
on
(
'
close
'
,
function
(
code
)
{
proc
.
on
(
'
close
'
,
function
(
code
)
{
sendResponse
(
"
命令执行完成。
"
);
});
}
//更新本地网页到服务器,异步
var
pushDatas
=
function
()
{
var
proc
ess
=
spawn
(
"
git
"
,
[
"
pull
"
,
"
origin
"
],
{
cwd
:
config
.
git_html_path
});
proc
ess
.
stdout
.
setEncoding
(
'
utf8
'
);
proc
ess
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
var
proc
=
spawn
(
"
git
"
,
[
"
pull
"
,
"
origin
"
],
{
cwd
:
config
.
git_html_path
,
env
:
process
.
env
});
proc
.
stdout
.
setEncoding
(
'
utf8
'
);
proc
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
git pull:
"
+
data
);
});
proc
ess
.
stderr
.
setEncoding
(
'
utf8
'
);
proc
ess
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
proc
.
stderr
.
setEncoding
(
'
utf8
'
);
proc
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
git pull error:
"
+
data
);
});
proc
ess
.
on
(
'
close
'
,
function
(
code
)
{
proc
.
on
(
'
close
'
,
function
(
code
)
{
sendResponse
(
"
请稍候。
"
);
try
{
execSync
(
'
git add --all .
'
,
{
cwd
:
config
.
git_html_path
});
execSync
(
'
git commit -m update-auto
'
,
{
cwd
:
config
.
git_html_path
});
execSync
(
'
git add --all .
'
,
{
cwd
:
config
.
git_html_path
,
env
:
process
.
env
});
execSync
(
'
git commit -m update-auto
'
,
{
cwd
:
config
.
git_html_path
,
env
:
process
.
env
});
}
catch
(
error
)
{
sendResponse
(
"
git error:
"
+
error
.
stdout
);
}
var
proc
ess2
=
spawn
(
"
git
"
,
[
"
push
"
],
{
cwd
:
config
.
git_html_path
});
proc
ess
2
.
stdout
.
setEncoding
(
'
utf8
'
);
proc
ess
2
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
var
proc
2
=
spawn
(
"
git
"
,
[
"
push
"
],
{
cwd
:
config
.
git_html_path
,
env
:
process
.
env
});
proc2
.
stdout
.
setEncoding
(
'
utf8
'
);
proc2
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
git push:
"
+
data
);
});
proc
ess
2
.
stderr
.
setEncoding
(
'
utf8
'
);
proc
ess
2
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
proc2
.
stderr
.
setEncoding
(
'
utf8
'
);
proc2
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
git push:
"
+
data
);
});
proc
ess
2
.
on
(
'
close
'
,
function
(
code
)
{
proc2
.
on
(
'
close
'
,
function
(
code
)
{
sendResponse
(
"
命令执行完成。
"
);
});
});
...
...
@@ -250,29 +250,29 @@ var copyToYGOPRO = function() {
//生成更新包,异步
var
packDatas
=
function
()
{
var
proc
ess
=
spawn
(
"
7za
"
,
[
"
a
"
,
"
-x!*.zip
"
,
"
-x!mobile.cdb
"
,
"
ygosrv233-pre.zip
"
,
"
*
"
],
{
cwd
:
config
.
db_path
});
proc
ess
.
stdout
.
setEncoding
(
'
utf8
'
);
proc
ess
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
var
proc
=
spawn
(
"
7za
"
,
[
"
a
"
,
"
-x!*.zip
"
,
"
-x!mobile.cdb
"
,
"
ygosrv233-pre.zip
"
,
"
*
"
],
{
cwd
:
config
.
db_path
,
env
:
process
.
env
});
proc
.
stdout
.
setEncoding
(
'
utf8
'
);
proc
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
7z:
"
+
data
);
});
proc
ess
.
stderr
.
setEncoding
(
'
utf8
'
);
proc
ess
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
proc
.
stderr
.
setEncoding
(
'
utf8
'
);
proc
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
7z error:
"
+
data
);
});
proc
ess
.
on
(
'
close
'
,
function
(
code
)
{
proc
.
on
(
'
close
'
,
function
(
code
)
{
execSync
(
'
mv -f "
'
+
config
.
db_path
+
'
ygosrv233-pre.zip" "
'
+
config
.
html_path
+
'
"
'
);
sendResponse
(
"
电脑更新包打包完成。
"
);
});
var
proc
ess2
=
spawn
(
"
7za
"
,
[
"
a
"
,
"
-x!*.zip
"
,
"
-x!expansions
"
,
"
ygosrv233-pre-mobile.zip
"
,
"
*
"
],
{
cwd
:
config
.
db_path
});
proc
ess
2
.
stdout
.
setEncoding
(
'
utf8
'
);
proc
ess
2
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
var
proc
2
=
spawn
(
"
7za
"
,
[
"
a
"
,
"
-x!*.zip
"
,
"
-x!expansions
"
,
"
ygosrv233-pre-mobile.zip
"
,
"
*
"
],
{
cwd
:
config
.
db_path
,
env
:
process
.
env
});
proc2
.
stdout
.
setEncoding
(
'
utf8
'
);
proc2
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
7z:
"
+
data
);
});
proc
ess
2
.
stderr
.
setEncoding
(
'
utf8
'
);
proc
ess
2
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
proc2
.
stderr
.
setEncoding
(
'
utf8
'
);
proc2
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
7z error:
"
+
data
);
});
proc
ess
2
.
on
(
'
close
'
,
function
(
code
)
{
proc2
.
on
(
'
close
'
,
function
(
code
)
{
execSync
(
'
mv -f "
'
+
config
.
db_path
+
'
ygosrv233-pre-mobile.zip" "
'
+
config
.
html_path
+
'
"
'
);
sendResponse
(
"
手机更新包打包完成。
"
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment