fastlane/lib/fastlane/actions/get_version_number.rb in fastlane-2.115.0.beta.20190122200028 vs fastlane/lib/fastlane/actions/get_version_number.rb in fastlane-2.115.0.beta.20190123200015
- old
+ new
@@ -111,23 +111,23 @@
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :xcodeproj,
env_name: "FL_VERSION_NUMBER_PROJECT",
- description: "optional, you must specify the path to your main Xcode project if it is not in the project root directory",
+ description: "Path to the main Xcode project to read version number from, optional. By default will use the first Xcode project found within the project root directory",
optional: true,
verify_block: proc do |value|
UI.user_error!("Please pass the path to the project, not the workspace") if value.end_with?(".xcworkspace")
UI.user_error!("Could not find Xcode project at path '#{File.expand_path(value)}'") if !File.exist?(value) && !Helper.test?
end),
FastlaneCore::ConfigItem.new(key: :target,
env_name: "FL_VERSION_NUMBER_TARGET",
- description: "Specify a specific target if you have multiple per project, optional",
+ description: "Target name, optional. Will be needed if you have more than one non-test target to avoid being prompted to select one",
optional: true),
FastlaneCore::ConfigItem.new(key: :configuration,
env_name: "FL_VERSION_NUMBER_CONFIGURATION",
- description: "Specify a specific configuration if you have multiple per target, optional",
+ description: "Configuration name, optional. Will be needed if you have altered the configurations from the default or your version number depends on the configuration selected",
optional: true)
]
end
def self.output
@@ -144,10 +144,14 @@
[:ios, :mac].include?(platform)
end
def self.example_code
[
- 'version = get_version_number(xcodeproj: "Project.xcodeproj")'
+ 'version = get_version_number(xcodeproj: "Project.xcodeproj")',
+ 'version = get_version_number(
+ xcodeproj: "Project.xcodeproj",
+ target: "App"
+ )'
]
end
def self.return_type
:string