Closed ttwrpz closed 2 years ago
This was an intentional feature. The thought behind this decision was offering the ability to roll back in case there was a bug in a newer version. In that case, just push the old version to the branch being monitored.
I will think on potential work around for you and send another update soon. I do not believe a change to the base functionality would be wise as it could potentially impact applications that rely on it.
Okay, I get it. Thank you so much for your response! ❤️
I believe the best solution for this scenario would be to utilize an environment variable to disable updates during development.
If you are using vscode to run/debug, you can add this to your launch config
"environment": [
{
"name": "noUpdate",
"value": "true"
}
]
From your project where calling Auto-Git-Update, you could do something similar to this.
const updater = new AutoGitUpdate(config);
const doUpdate = process.env.noUpdate != 'true';
if (update) updater.autoUpdate();
Thank you ❤️
Hello, authors. I always face a problem that when I'm developing, AutoGitUpdate will always detect that it's not up to date. When I looked into the code, I found the line that always compares the local version and remote version is equal or not. I want to know to prevent this. Thank you. (P.S. Sorry for my grammar)