final command setup (hopfully)

This commit is contained in:
Brenden Harrell committed 2021-10-10 22:01:10 -05:00
1 parent ae7eaad7ba
commit f00d0fe567
1 file changed
+5 -3
+5 -3
View File
@@ -892,9 +892,11 @@ exports.newHttpInterface = function newHttpInterface() {
const git = simpleGit(options) const git = simpleGit(options)
try { try {
await git.checkout(currentBranch) await git.checkout(currentBranch)
let postCheckoutCommands = ['pull', `https://github.com/Superalgos/Superalgos.git ${currentBranch}`] let setUpstream = ['remote', 'add', 'upstream', 'https://github.com/Superalgos/Superalgos']
await git.raw(postCheckoutCommands); await git.raw(setUpstream);
let updateToMainRepo = ['reset', `--hard https://github.com/Superalgos/Superalgos.git/${currentBranch}`] let pullMainRepo = ['pull', 'upstream', `${currentBranch}`]
await git.raw(pullMainRepo);
let updateToMainRepo = ['reset', '--hard', `upstream/${currentBranch}`]
await git.raw(updateToMainRepo); await git.raw(updateToMainRepo);
} catch (err) { } catch (err) {