This project is a fastlane plugin. To get started with fastlane-plugin-flutter_versioner
, add it to your project by running:
fastlane add_plugin flutter_versioner
Flutter versioner is a powerful fastlane plugin designed to simplify the management of flutter project version. With this you can easily update project version to any specified major,minor,or patch level as well as adjust the version code/build number.
flutter_versioner(pubspec_file_path:"../pubspec.yaml",
version_component:"major"
)
-
pubspec_file_path - relative path to the pubspec file where the version is maintained
-
version_component - the component of version that need to be modified - major.minor.patch+version_code
Values
- major
- minor
- patch
- version_code (default value)
-
value - the value given will be used to set the given version component. If
value
is not given the version compenent will be incremented by1
Check out the example Fastfile
to see how to use this plugin. Try it by cloning the repo, running fastlane install_plugins
.
eg 1.1.1+1 -> 1.1.1+2
flutter_versioner(pubspec_file_path:"./example/pubspec.yaml",
version_component:"version_code")
if you dont specify version_component
version_code will the default value
flutter_versioner(pubspec_file_path:"./example/pubspec.yaml",
value:"9")
eg 1.1.1+1 -> 1.1.1+100
flutter_versioner(pubspec_file_path:"./example/pubspec.yaml",
value:"100",
version_component:"version_code")
eg 1.1.1 -> 1.1.2
flutter_versioner(pubspec_file_path:"./example/pubspec.yaml",
version_component:"patch")
eg 1.1.1 -> 1.1.100
flutter_versioner(pubspec_file_path:"./example/pubspec.yaml",
value:"100",
version_component:"patch")
eg 1.1.1 -> 1.2.0
flutter_versioner(pubspec_file_path:"./example/pubspec.yaml",
version_component:"minor")
eg 1.1.1 -> 1.100.0
flutter_versioner(pubspec_file_path:"./example/pubspec.yaml",
value:"100",
version_component:"minor")
eg 1.1.1 -> 2.0.0
flutter_versioner(pubspec_file_path:"./example/pubspec.yaml",
version_component:"major")
eg 1.1.1 -> 100.0.0
flutter_versioner(pubspec_file_path:"./example/pubspec.yaml",
value:"100",
version_component:"major")
eg 1.1.1+1 -> 2.3.4+1
flutter_versioner(pubspec_file_path:"./example/pubspec.yaml",
value:"2.3.4",
version_component:"version_name")
eg 1.1.1+1 -> 2.3.4+5
flutter_versioner(pubspec_file_path:"./example/pubspec.yaml",
value:"2.3.4+5",
version_component:"version")
To run both the tests, and code style validation, run
rake
To automatically fix many of the styling issues, use
rubocop -a
For any other issues and feedback about this plugin, please submit it to this repository.
If you have trouble using plugins, check out the Plugins Troubleshooting guide.
For more information about how the fastlane
plugin system works, check out the Plugins documentation.
fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.
Abhijith Konnayil
GitHub: abhijithkonnayil
LinkedIn: abhijithkonnayil
Website: abhijith.web.app