Skip to content

get_build_number

Community Action Reference: Inspected directly from Fastlane core ruby gem definitions.

Supported Platforms: ios, mac

Get the build number of your project

Details

This action will return the current build number set on your project. You first have to set up your Xcode project, if you haven’t done it already: https://developer.apple.com/library/ios/qa/qa1827/_index.html.

Parameters & Options

Total options available: 2

Key Type Env Variable Default Required Description
xcodeproj String FL_BUILD_NUMBER_PROJECT - No optional, you must specify the path to your main Xcode project if it is not in the project root directory
hide_error_when_versioning_disabled Fastlane::Boolean FL_BUILD_NUMBER_HIDE_ERROR_WHEN_VERSIONING_DISABLED false Yes Used during fastlane init to hide the error message

Lane Context Shared Values

This action writes the following values to Actions.lane_context[SharedValues::...]:

Key Description
SharedValues::BUILD_NUMBER The build number

Examples

build_number = get_build_number(xcodeproj: "Project.xcodeproj")

Source & Upstream