Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run bash command in CocoaPods post_install step

I would like to make CocoaPods run git submodule init in the project root directory after it's done installing the pods. There is a post_install hook, but I found very little information about how to use it. Can it be used to run arbitrary bash commands?

like image 596
Jawap Avatar asked Oct 12 '14 15:10

Jawap


People also ask

What does the Podfile do?

The Podfile specifies the dependencies of each user target. pod is the way to declare a specific dependency. podspec provides an easy API for the creation of podspecs. target is how you scope your dependencies to specific targets in your Xcode projects.

What is Podfile lock file?

Podfile. lock is used to make sure that every members of the team has the same versions of pods installed on the project. This file is generated after you run the command: pod install. It gets updated when you run pod install or pod update.


1 Answers

Well, that was easier than expected...

post_install do |installer|
  system("git submodule init")
end
like image 107
Jawap Avatar answered Sep 28 '22 07:09

Jawap