What is it used for?

Componentized development using PODS in the iOS world often requires a series of manual operations to update the Pod component. In particular, some business-related Pod components need to be updated frequently. As components get bigger and bigger, each time you update them, you execute pod Lib Lint, wait a few minutes, the PodSpec file passes, need to tag, then pod repo push, then wait a few more minutes, To complete the update of a Pod component. The whole process is time-consuming, cumbersome and mechanical. This script doesn’t speed up pod Lib Lint and Pod repo push, but it does make these tedious operations complete in one sentence. You can execute the script in one sentence, then leave to get a glass of water, refresh yourself, take a break, and come back with the Pod component updated and pushed to the remote end.

Prerequisites:

Your Pod components must be configured correctly and have previously been manually typed with command line updates.

Actions included in the script:

1. Podspec small versions add one to themselves. For example, S.sion = “0.1.1” becomes S.sion = “0.1.2”, or S.sion = “10.22.0.15” becomes S.sion = “10.22.0.16”. No matter what the version looks like, if it’s written in a way that passes PodSpec’s syntax check, it will automatically update the last bit.

Pod lib Lint syntax check, if there are dependencies on private sources, you can configure the address at the top, both for github open source components, but also for Gitlab team private components, as for Bitbucket, I haven’t tried, but it should be possible in theory, if you find it is not possible, If you cannot solve the problem after debugging yourself, you can raise it on issue.

3. Git add, git commit, git push, git tag, git push — tags.

4. The POD repo push operation pushes the POD component to the remote end to complete a small version update of the POD component.

How to use

1. Drag the auto-. py file into the Pod component project and make sure it is at the same level as the PodSpec file, as shown below

Add auto.py to.gitignore yourself if you feel the need.

2. Open Auto-. py and perform the configuration in the dashed line box at the top. The following figure

The first source is the private source address that the POD component depends on. It is an array of private sources that can be filled in, separated by commas. The github.com/CocoaPods/S… You don’t need to fill it in, it’s already written in the script.

The second item is the name of your project

The third item is the podSpec file name

3. Open the terminal, go to the directory where the script file is stored, and run Python Auto. If your Pod is configured correctly and you have previously manually entered instructions to upgrade, the script should work.

Script address

Click here to