At its core, fastlane is a set of Ruby scripts that automates the deployment of iOS and Android apps. In many cases, the scripts already available within the fastlane toolset are enough to publish your apps, but in some cases, you might find it useful to add your own scripts.
Writing a script that increments the build version is not necessary for iOS, as there is already a lane called increment_build_number that performs this same task.
In the fastlane world, a script is called a lane, and in this recipe, you created a new lane with the following instructions:
lane :IncrementVersion do
end
You write lanes using Ruby, an open source language that is beyond the scope of this book but should be simple enough to read.
The following instruction sets the path variable, which points to the position of the pubspec.yaml file in your project, which is the file that will be updated by the script:
path = '../../pubspec.yaml'
With the following instruction...