crafter icon indicating copy to clipboard operation
crafter copied to clipboard

post_install hook on Podfile [question]

Open esttorhe opened this issue 9 years ago • 1 comments

Hi; don't know if there's a way to actually add a post_install or append some code to the Podfile from Crafter.

This tool is really nice and I'm setting a Crafter configuration file to share among the developers of the department.

We use the Acknowledgements post install to generate and move to the Settings.bundle and would very much like to include this from crafter to avoid copying and pasting on every new project.

I know pretty much nothing about Ruby and just wandering if Crafter already supports this.

Thanks.

esttorhe avatar Aug 22 '14 01:08 esttorhe

Hey @esttorhe, although crafter does support arbitrary ruby code to execute (you can see in readme file example when I use ruby to copy files around) the optionals (and thus that arbitrary code) are executed before Pods are modified so atm that wouldn't work.

It should be very straightforward to add, we'd just need to modify target_configuration.rb to add something like attr_accessible pods_post_install, then in write_pods just puts content of that into a file handle.

You could send me a PR or I can add it in few days (quite busy now).

krzysztofzablocki avatar Aug 22 '14 11:08 krzysztofzablocki