5

I have a "run script" step that dynamically creates resources/files that I copy into the build dirs. Every run of this script produces different content so I want it to run on every build. The script gets run correctly on a clean build however once a build is made the step is not run again since no source has been modified.

I tried setting the input of the step to /dev/random but it does not seem to trigger a changed environment and does not re run the step.

Is there a way I can set this up so this step gets run ever time build is pressed, as opposed to only when the source is modified or clean?

1
  • I have a run script build phase in my project and it runs every time I press the Build button, whether files have been modified or not. I kno w this for sure for it copies the product to a specific location and the modified date stamp of the copy changes each time I press Build. Perhaps if you leave this input thing you mention? Commented Nov 4, 2009 at 17:55

1 Answer 1

5

You should put the Run Script build phase in a separate Aggregate Target, and make your main target dependent on the Aggregate Target. The Aggregate should be built every time.

Sign up to request clarification or add additional context in comments.

2 Comments

Doesn't work well if you need environment variables like $DERIVED_FILES_DIR
Even when I put it in separate Aggregate Target, it is not running the script every time build happens.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.