This project is a fastlane plugin. To get started with fastlane-plugin-versioning, add it to your project by running:
fastlane add_plugin versioning
Extends fastlane versioning actions. Allows to set/get versions without using agvtool and do some other small tricks.
Increment/set version number in Info.plist of specific target. Doesn't use agvtool (unlike default increment_version_number).
increment_version_number_in_plist # Automatically increment patch version number.
increment_version_number_in_plist(
bump_type: 'patch' # Automatically increment patch version number
)
increment_version_number_in_plist(
bump_type: 'minor' # Automatically increment minor version number
)
increment_version_number_in_plist(
bump_type: 'major' # Automatically increment major version number
)
increment_version_number_in_plist(
version_number: '2.1.1' # Set a specific version number
)
increment_version_number_in_plist(
# Automatically increment patch version number. Use App Store version number as a source.
version_source: 'appstore'
)
increment_version_number_in_plist(
# specify specific version number (optional, omitting it increments patch version number)
version_number: '2.1.1',
# (optional, you must specify the path to your main Xcode project if it is not in the project root directory
# or if you have multiple xcodeproj's in the root directory)
xcodeproj: './path/to/MyApp.xcodeproj'
# (optional)
target: 'TestTarget'
)
Get version number from Info.plist of specific target. Doesn't use agvtool (unlike default get_version_number).
version = get_version_number_from_plist(xcodeproj: 'Project.xcodeproj', # optional
target: 'TestTarget', # optional
# optional, must be specified if you have different Info.plist build settings
# for different build configurations
build_configuration_name: 'Release')
version = get_app_store_version_number(xcodeproj: 'Project.xcodeproj', # optional
target: 'TestTarget', # optional
# optional, must be specified if you have different Info.plist build settings
# for different build configurations
build_configuration_name: 'Release')
)
version = get_app_store_version_number(bundle_id: 'com.apple.Numbers')
# Extracts version number from git branch name.
# `pattern` is pattern by which version number will be found, `#` is place where action must find version number.
# Default value is 'release-#'(for instance for branch name 'releases/release-1.5.0' will extract '1.5.0')
version = get_version_number_from_git_branch(pattern: 'release-#')
Increment/set build number in Info.plist of specific target. Doesn't use agvtool (unlike default increment_version_number).
increment_build_number_in_plist # Automatically increments build number.
increment_build_number_in_plist(
build_number: 42 # set build number to 42
)
Get build number from Info.plist of specific target. Doesn't use agvtool (unlike default get_build_number).
version = get_build_number_from_plist(xcodeproj: "Project.xcodeproj", # optional
target: 'TestTarget', # optional
build_configuration_name: 'Release') # optional, must be specified if you have different Info.plist build settings for different build configurations
Get a path to target's Info.plist
get_info_plist_path(xcodeproj: 'Test.xcodeproj', # optional
target: 'TestTarget', # optional
# optional, must be specified if you have different Info.plist build settings
# for different build configurations
build_configuration_name: 'Release')
For any other issues and feedback about this plugin, please submit it to this repository.
For some more detailed help with plugins problems, check out the Plugins Troubleshooting doc in the main fastlane
repo.
For more information about how the fastlane
plugin system works, check out the Plugins documentation in the main fastlane
repo.
fastlane
automates building, testing, and releasing your app for beta and app store distributions. To learn more about fastlane
, check out fastlane.tools.