Increment or set the version in a podspec file
You can use this action to manipulate any 'version' variable contained in a ruby file.
For example, you can use it to bump the version of a CocoaPods' podspec file.
It also supports versions that are not semantic:
For such versions, there is an option to change the appendix (e.g.
|Supported platforms||ios, mac|
version = version_bump_podspec(path: "TSMessages.podspec", bump_type: "patch")
version = version_bump_podspec(path: "TSMessages.podspec", version_number: "1.4")
||You must specify the path to the podspec file to update||*|
||The type of this version bump. Available: patch, minor, major||
||Change to a specific version. This will replace the bump type value|
||Change version appendix to a specific value. For example 126.96.36.199.1 -> 188.8.131.52|
||true by default, this is used for non CocoaPods version bumps only||
* = default value is dependent on the user's system
To show the documentation in your terminal, run
fastlane action version_bump_podspec
It is recommended to add the above action into your
Fastfile, however sometimes you might want to run one-offs. To do so, you can run the following command from your terminal
fastlane run version_bump_podspec
To pass parameters, make use of the
: symbol, for example
fastlane run version_bump_podspec parameter1:"value1" parameter2:"value2"
It's important to note that the CLI supports primitive types like integers, floats, booleans, and strings. Arrays can be passed as a comma delimited string (e.g.
param:"1,2,3"). Hashes are not currently supported.
It is recommended to add all fastlane actions you use to your
This action, just like the rest of fastlane, is fully open source, view the source code on GitHub