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
6406988f
Commit
6406988f
authored
Sep 28, 2015
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change order
parent
de13c777
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
ygopro-pre.js
ygopro-pre.js
+24
-24
No files found.
ygopro-pre.js
View file @
6406988f
...
...
@@ -185,7 +185,7 @@ var loadAllDbs = function() {
//从远程更新数据库,异步
var
fetchDatas
=
function
()
{
var
proc
=
spawn
(
"
git
"
,
[
"
pull
"
,
"
origin
"
],
{
cwd
:
config
.
git_db_path
,
env
:
process
.
env
});
var
proc
=
spawn
(
"
git
"
,
[
"
pull
"
,
"
origin
"
,
"
master
"
],
{
cwd
:
config
.
git_db_path
,
env
:
process
.
env
});
proc
.
stdout
.
setEncoding
(
'
utf8
'
);
proc
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
git pull:
"
+
data
);
...
...
@@ -195,41 +195,41 @@ var fetchDatas = function() {
sendResponse
(
"
git pull error:
"
+
data
);
});
proc
.
on
(
'
close
'
,
function
(
code
)
{
sendResponse
(
"
命令执行完成。
"
);
sendResponse
(
"
数据更新完成。
"
);
});
var
proc2
=
spawn
(
"
git
"
,
[
"
pull
"
,
"
origin
"
,
"
master
"
],
{
cwd
:
config
.
git_html_path
,
env
:
process
.
env
});
proc2
.
stdout
.
setEncoding
(
'
utf8
'
);
proc2
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
git pull:
"
+
data
);
});
proc2
.
stderr
.
setEncoding
(
'
utf8
'
);
proc2
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
git pull error:
"
+
data
);
});
proc2
.
on
(
'
close
'
,
function
(
code
)
{
sendResponse
(
"
网页同步完成。
"
);
});
}
//更新本地网页到服务器,异步
var
pushDatas
=
function
()
{
var
proc
=
spawn
(
"
git
"
,
[
"
pull
"
,
"
origin
"
],
{
cwd
:
config
.
git_html_path
,
env
:
process
.
env
});
try
{
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
=
spawn
(
"
git
"
,
[
"
push
"
],
{
cwd
:
config
.
git_html_path
,
env
:
process
.
env
});
proc
.
stdout
.
setEncoding
(
'
utf8
'
);
proc
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
git pu
ll
:
"
+
data
);
sendResponse
(
"
git pu
sh
:
"
+
data
);
});
proc
.
stderr
.
setEncoding
(
'
utf8
'
);
proc
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
git pu
ll error
:
"
+
data
);
sendResponse
(
"
git pu
sh
:
"
+
data
);
});
proc
.
on
(
'
close
'
,
function
(
code
)
{
sendResponse
(
"
请稍候。
"
);
try
{
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
proc2
=
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
);
});
proc2
.
stderr
.
setEncoding
(
'
utf8
'
);
proc2
.
stderr
.
on
(
'
data
'
,
function
(
data
)
{
sendResponse
(
"
git push:
"
+
data
);
});
proc2
.
on
(
'
close
'
,
function
(
code
)
{
sendResponse
(
"
命令执行完成。
"
);
});
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