Post

Replies

Boosts

Views

Activity

Xcode - Postbuild Step and automation
Google Searches are landing me in very old Xcode examples. problem statement: Creating a command-line tool within Xcode, and need to copy the resulting EXE file local to the project so that I can run some unit test cases with it (these are done out side of Xcode). The tool I am creating is a is a parser, so I have numerous files/test cases in a directory, once I build I want to run my 100 or so test cases using shell script, but to do that - I need the EXE copy local. I want to write some simple Bash/Python scripts to execute my various test cases external to Xcode. Question 1 - Where are some good examples of how to configure post build steps?? My solution was to use a POST BUILD action - I edit the BUILD->PostAction and add a script The script is "chmod a+x" When the script runs, it produces output ... ie: "Hello this is your script" I don't see this in the BUILD LOG do see the script referenced inside the 'project files' Thinking maybe the script did run... I have the script creates a file my home directory - but that still does not help. Searching Apple Xcode docs don't seem to work very well - is there a better way to search other then from within Xcode? To be clear, in Xcode, I click "Product -> Clean Build folder", then "Product -> Build", I am expecting my post build script to run. Examples: https-//stackoverflow.com/questions/1331517/xcode-post-build-copy-file-actions https-//stackoverflow.com/questions/16659590/xcode-doesnt-seem-to-execute-my-schemes-post-action Question 2 - What ENV variables are available to pre/post build scripts? Is there a link to a page that can show some examples? Question 3 - Is there a way to create a Headless build with Xcode? For example think of a "nightly build" environment. this is not an "Xcode Server" setup - I want a pure command line build on my laptop that I can script in some way. I can do the with Visual Studio, ie: "devenv.exe", I can do that with Eclipse in Headless mode. I can do this with Unix makefiles, and a CRON job... Just can't find that for Xcode.
1
0
4.5k
Mar ’21