From 462d1c05a5ca24a74c1525d9479229a93bb55f34 Mon Sep 17 00:00:00 2001 From: Leko Date: Fri, 30 Dec 2022 01:55:03 +0800 Subject: [PATCH] fix: git branch --- index.js | 10 ++++------ package.json | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index d1c18aa..7b9bb00 100644 --- a/index.js +++ b/index.js @@ -77,28 +77,26 @@ if (config.PokaPlayer.debug) { // 檢查 branch git.raw(["symbolic-ref", "--short", "HEAD"]).then(branch => { branch = branch.slice(0, -1); // 結果會多一個換行符 - if (branch != (config.PokaPlayer.debug ? "dev" : "master")) { + if (branch != (config.PokaPlayer.debug ? "dev" : "master-3")) { git.fetch(["--all"]) .then(() => - git.reset(["--hard", "origin/" + (config.PokaPlayer.debug ? "dev" : "master")]) + git.reset(["--hard", "origin/" + (config.PokaPlayer.debug ? "dev" : "master-3")]) ) - .then(() => git.checkout(config.PokaPlayer.debug ? "dev" : "master")) + .then(() => git.checkout(config.PokaPlayer.debug ? "dev" : "master-3")) .then(() => process.exit()) .catch(err => { console.error("failed: ", err); - socket.emit("err", err.toString()); }); } }); -// app.use(express.json()); app.use(express.static("public")) app.use(helmet({ contentSecurityPolicy: false, })) app.use(compression()) // disable X-Powered-By app.set('x-powered-by', false); -//session +// session app.use(session) io.use(sharedsession(session, { autoSave: true diff --git a/package.json b/package.json index c0ef4cf..156ba00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pokaplayer", - "version": "3.8.1", + "version": "3.8.2", "description": "", "main": "index.js", "scripts": {