Xcode automatically cancelled custom script which is added on build phase script

I am trying to run custom scrip which I can run manually on command but I want that script to be run on xcode when I build the project for Any iOS device Target.

I have not specify any input or output files on this cause I don't have any requirements for that.It runs for some seconds and then xcode automatically cancelled it. can anyone guide me on this. thanks in advance.

Please see attached image for reference.

Note - Script could take 10-15 minutes of time to complete, Could this be a issue of automatically cancelled the scrip?

Turns out I was auto-incrementing the build number inside my script file to my .xcodeproj file. due to that Xcode is canceling my script.

Xcode automatically cancelled custom script which is added on build phase script
 
 
Q