Skip to content

Commit

Permalink
修正 git 指令順序
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoOwO committed Aug 12, 2018
1 parent 81919cf commit 81e92e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ git
if (branch != (config.PokaPlayer.debug ? 'dev' : 'master')) {
git
.fetch(["--all"])
.then(() => git.checkout(config.PokaPlayer.debug ? 'dev' : 'master'))
.then(() => git.reset(["--hard", "origin/" + (config.PokaPlayer.debug ? 'dev' : 'master')]))
.then(() => git.checkout(config.PokaPlayer.debug ? 'dev' : 'master'))
.then(process.exit)
.catch(err => {
console.error('failed: ', err)
Expand Down Expand Up @@ -125,8 +125,8 @@ io.on('connection', socket => {
git
.fetch(["--all"])
.then(() => socket.emit('git', 'fetch'))
.then(() => git.checkout(config.PokaPlayer.debug ? 'dev' : 'master'))
.then(() => git.reset(["--hard", "origin/" + (config.PokaPlayer.debug ? 'dev' : 'master')]))
.then(() => git.checkout(config.PokaPlayer.debug ? 'dev' : 'master'))
.then(() => socket.emit('git', 'reset'))
.then(() => socket.emit('restart'))
.then(() => process.exit())
Expand All @@ -146,8 +146,8 @@ app.get('/upgrade', (req, res) => {
if (!config.PokaPlayer.instantUpgradeProcess) {
git
.fetch(["--all"])
.then(() => git.checkout(config.PokaPlayer.debug ? 'dev' : 'master'))
.then(() => git.reset(["--hard", "origin/" + (config.PokaPlayer.debug ? 'dev' : 'master')]))
.then(() => git.checkout(config.PokaPlayer.debug ? 'dev' : 'master'))
.then(() => res.send('upgrade'))
.then(() => process.exit())
.catch(err => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pokaplayer",
"version": "0.6.4",
"version": "0.6.5",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 81e92e2

Please sign in to comment.