I’m very new to this environment so please forgive me if this has been asked. I tried searching and didn’t see anything.
I’m trying to figure out if there is a way to have a powershell command automatically execute if my firmware compiles/builds successfully.
Basically I have a 3D printer hooked up to octoprint which is a little linux box. I just need to get firmware.bin over to the sdcard in my printer. So I have a single line script that runs scp and sends the file over. I’m hoping to just have that run if the build is successful. Is this possible?
Happy to help. There’s a lot of information in the documentation, but sometimes finding a simple “hello world” solution for things is challenging. I love the environment and the folks here are great - still, I’m learning a little each day.
import os
os.system('powershell.exe [myscript.ps1]')
In that extra_script should do the trick …
Or if you want to get real fancy, you could override the default upload target, so that build just builds, but upload builds and then uploads if successful…