Compare commits
2 Commits
7efd0cd4f3
...
c46b7c6ea6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c46b7c6ea6 | ||
|
|
5d2097ecd4 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -297,3 +297,5 @@ cython_debug/
|
||||
# Ignore the config dirs
|
||||
config/
|
||||
|
||||
# Ignore the OP25 directory we will create
|
||||
op25/
|
||||
|
||||
@@ -18,6 +18,15 @@ export const checkForUpdates = async () => {
|
||||
if (latestCommitHash !== localCommitHash) {
|
||||
console.log('An update is available. Updating...');
|
||||
|
||||
// Check if there have been any changes to the code
|
||||
const gitStatus = await git.status()
|
||||
console.log(gitStatus);
|
||||
if (gitStatus.modified.length > 0){
|
||||
// There is locally modified code
|
||||
console.log("There is locally modified code, resetting...");
|
||||
await git.reset('hard', ['origin/master'])
|
||||
}
|
||||
|
||||
// Pull the latest changes from the remote repository
|
||||
await git.pull();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user