Class: Fastlane::Actions::GodotGetVersionAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::GodotGetVersionAction
- Defined in:
- lib/fastlane/plugin/godot/actions/godot_get_version_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .output ⇒ Object
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
29 30 31 |
# File 'lib/fastlane/plugin/godot/actions/godot_get_version_action.rb', line 29 def self. ['Mad Science Software'] end |
.available_options ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'lib/fastlane/plugin/godot/actions/godot_get_version_action.rb', line 40 def self. [ FastlaneCore::ConfigItem.new(key: :project_path, env_name: 'FL_GODOT_PROJECT_PATH', description: 'Directory containing project.godot', type: String, default_value: '.') ] end |
.description ⇒ Object
21 22 23 |
# File 'lib/fastlane/plugin/godot/actions/godot_get_version_action.rb', line 21 def self.description 'Read the version name and build number from export_presets.cfg' end |
.is_supported?(platform) ⇒ Boolean
50 51 52 |
# File 'lib/fastlane/plugin/godot/actions/godot_get_version_action.rb', line 50 def self.is_supported?(platform) true end |
.output ⇒ Object
33 34 35 36 37 38 |
# File 'lib/fastlane/plugin/godot/actions/godot_get_version_action.rb', line 33 def self.output [ ['GODOT_VERSION_NAME', 'Version name, e.g. "1.2.0"'], ['GODOT_VERSION_CODE', 'Build number / version code'] ] end |
.return_value ⇒ Object
25 26 27 |
# File 'lib/fastlane/plugin/godot/actions/godot_get_version_action.rb', line 25 def self.return_value 'Hash with :version_name (e.g. "1.2.0") and :version_code (integer build number)' end |
.run(params) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/fastlane/plugin/godot/actions/godot_get_version_action.rb', line 12 def self.run(params) cfg_path = File.join(File.(params[:project_path]), 'export_presets.cfg') versions = Helper::GodotVersions.read(cfg_path) UI.("Version #{versions[:version_name]} (build #{versions[:version_code]})") Actions.lane_context[SharedValues::GODOT_VERSION_NAME] = versions[:version_name] Actions.lane_context[SharedValues::GODOT_VERSION_CODE] = versions[:version_code] versions end |