-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add prepare_command
to Specification DSL
#1247
Comments
And this |
As the purpose of the command is to just generate/modify files it will be executed only once, after the download of the pod and before it is cleaned. |
This was already implemented in master. |
Will this automaticly resolve #1194? |
Yes, the pre install hook was executed during every installation as it was used in some cases to append files to the resources script (which is recreated from scratch). This is not necessary anymore because we have dedicated attributes for that now. |
@irrationalfab Where is a sample for the prepare_command? How would the following need to be changed?
|
Here. It is just a bash script executed in the root of the Pod. |
@irrationalfab What should I do about this? Travis-CI complains about this, but the latest stable CocoaPods I am getting from gem update is 0.22.3. If I update this for the unstable version then the spec would fail to install for all people who have the latest stable version... |
PS: Like this?
|
My mistake about updating the version of the specs repo. Btw, the 0.23 release is out. The command looks good to me. |
[Update] Cedar (0.9.1)
See the guides for prepare_command http://guides.cocoapods.org/syntax/podspec.html#prepare_command |
Are there any variables available to be passed to the prepare_command? I'm looking for a way to tell it the path to the consuming project. |
Hi, I'm new to CocoaPods, can you please confirm whether post_install hook is still working in PodFile? I am a bit confused as the documentation is still on the website https://guides.cocoapods.org/syntax/podfile.html#post_install suggesting its valid but reading this thread suggests it has been dropped. I have tried to do some logging within the hook and using version 0.37.2 and it appears it wasn't going through the post_install, so just wanted confirmation. Thanks! |
It still exists @Kenoy |
Give the recent introduction of the
resources_bundle
the usage case for the specification hooks are exhausting. It has been agreed to drop thepost_install
hook and to replace thepre_install
hook with theprepare_command
attribute.The
prepare_command
would take a bash script (a string) and this script would be executed before the Pods project is built to allow the script to generate and modify the files which would be picked by the other attributes.The script could simply execute a more complex script stored in the repository of the Pod.
The text was updated successfully, but these errors were encountered: