So I was wondering how to increase the version number or build number with Fastlane tools, so that I don't have to manually change the version.
So the answer to this question where the following two lanes. Keep in mind you need to activate some settings in your project by following this link.
With them I can increase the build number for the current version, or increase the version number and set the build number to 1.
The result will be [ver++] v1.0.0 (1)
(you can change the syntax as you please) and it gets automatically committed to git
Build Bump:
lane :buildbump do
version = get_version_number
build = increment_build_number
commit_version_bump(
xcodeproj:"MyProject.xcodeproj",
message: "[ver++] v#{version} (#{build})"
)
end
Version Bump:
lane :versionbump do
version = increment_version_number
build = increment_build_number(build_number: 1)
commit_version_bump(
xcodeproj:"MyProject.xcodeproj",
message: "[ver++] v#{version} (#{build})"
)
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With