break up git commands
This commit is contained in:
1 parent
baf64da77c
commit
ae7eaad7ba
1 file changed
+4
-3
@@ -892,9 +892,10 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
const git = simpleGit(options)
|
||||
try {
|
||||
await git.checkout(currentBranch)
|
||||
let postCheckoutCommands = ['pull', `https://github.com/Superalgos/Superalgos.git ${currentBranch}`, 'reset', `--hard https://github.com/Superalgos/Superalgos.git/${currentBranch}`]
|
||||
let result = await git.raw(postCheckoutCommands);
|
||||
console.log(result)
|
||||
let postCheckoutCommands = ['pull', `https://github.com/Superalgos/Superalgos.git ${currentBranch}`]
|
||||
await git.raw(postCheckoutCommands);
|
||||
let updateToMainRepo = ['reset', `--hard https://github.com/Superalgos/Superalgos.git/${currentBranch}`]
|
||||
await git.raw(updateToMainRepo);
|
||||
|
||||
} catch (err) {
|
||||
console.log('[ERROR] Error changing current branch to ' + currentBranch)
|
||||
|
||||
Reference in new issue
Block a user