I have a python script to aggregative GIT info like commit and branch name, in the root directory of my project.
I want the script to execute as a pre-build step.
I go to Properties -> Settings -> Build Steps ... and enter the command to run the script with the `Release_FLASH` config"
cd.. python sample.py
However, the python script does not execute.
I tried creating a .bat file with the same execution instructions, but still no luck.
What am I missing here? Is there a flag I need to set somewhere?
Solved! Go to Solution.
Hi @Farnam,
If the file (.py or .bat) is not included inside the project and by project properties, try with the whole path to the file so it can be recognized, as such:
python "C:\User\user\Downloads\hello_world.py"
I did a simple test with a hello world and it printed before finishing building:
If this still does not work, try to add
cmd.exe
in front of your command line, so it launches the windows shell/command prompt.
Best regards,
Julián
Hi @Farnam,
If the file (.py or .bat) is not included inside the project and by project properties, try with the whole path to the file so it can be recognized, as such:
python "C:\User\user\Downloads\hello_world.py"
I did a simple test with a hello world and it printed before finishing building:
If this still does not work, try to add
cmd.exe
in front of your command line, so it launches the windows shell/command prompt.
Best regards,
Julián
Hi @Julián_AragónM ,
Thank you!!
This may well have worked, so I'll mark it as the accepted answer.
However, I ended up doing the following work-around.