Im having an issue when pushing using the git-auto-commi.bat
The gateway event on save execute the script and does every steps but does not push, i have tried to do it in pyhton script or in a .bat file.
The issue is that when i use a script console the push line is executed but not on a gateway event
here is the code i used:
path="C:\Program Files\Inductive Automation\Ignition\data\projects"
gitpath="C:\Program Files\Git\cmd\git.exe"
import time
try:
logger = system.util.getLogger("myLogger")
system.util.execute([gitpath,"config","--global","user.name","'username"])
system.util.execute([gitpath,"config","--global","user.email","email@email.com"])
system.util.execute([gitpath,"config","--global","user.password","password"])
system.util.execute([gitpath,"-C",path,"add","."])
system.util.execute([path+"\git-auto-commit.bat"])
time.sleep(5)
dateStr=str(system.date.now())
system.util.execute([gitpath,"-C",path,"commit","-m","Designer save @ "+dateStr])
time.sleep(10)
system.util.execute([gitpath,"-C",path,"push origin"])
logger.info("git update done!")
except Exception as e:
logger.infof("error, errorMsg: \n",e)
And this the scripot from the .bat file:
cd "C:\Program Files\Inductive Automation\Ignition\data\projects
git config --global user.name "username"
git config --global user.email "email"
git config --global user.password "password"
git add .
git commit -m "Designer saved"
git push origin