Class: Fastlane::Actions::UnityGetVersionNumberAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::UnityGetVersionNumberAction
- Defined in:
- lib/fastlane/plugin/unity_exporter/actions/unity_get_version_number.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
26 27 28 |
# File 'lib/fastlane/plugin/unity_exporter/actions/unity_get_version_number.rb', line 26 def self. ["steft"] end |
.available_options ⇒ Object
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/fastlane/plugin/unity_exporter/actions/unity_get_version_number.rb', line 38 def self. [ FastlaneCore::ConfigItem.new(key: :project_path, env_name: "FL_UNITY_PROJECT_PATH", description: "The path to the Unity project. The starting point for relative paths is the directory that contains the 'fastlane' folder", optional: true, type: String, conflicting_options: [:arguments]) ] end |
.description ⇒ Object
22 23 24 |
# File 'lib/fastlane/plugin/unity_exporter/actions/unity_get_version_number.rb', line 22 def self.description "Will get the version number that was used for the latest Unity export action. Therefore make sure to call the Unity export action before you use this action." end |
.details ⇒ Object
34 35 36 |
# File 'lib/fastlane/plugin/unity_exporter/actions/unity_get_version_number.rb', line 34 def self.details # Optional: end |
.is_supported?(platform) ⇒ Boolean
49 50 51 52 53 54 |
# File 'lib/fastlane/plugin/unity_exporter/actions/unity_get_version_number.rb', line 49 def self.is_supported?(platform) # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example) # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform [:ios, :android].include?(platform) true end |
.return_value ⇒ Object
30 31 32 |
# File 'lib/fastlane/plugin/unity_exporter/actions/unity_get_version_number.rb', line 30 def self.return_value "Returns the version number that was used for the latest Unity export action. In case of error will return 'unity_exporter_error_occurred'." end |
.run(params) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/fastlane/plugin/unity_exporter/actions/unity_get_version_number.rb', line 9 def self.run(params) if params[:project_path] Helper::UnityEditorHelper.instance_variable_set(:@project_path, params[:project_path]) end version_number = Helper::BuildExporterHelper.version_number if version_number == "" return "unity_exporter_error_occurred" end return version_number end |