Class: Fastlane::Actions::AnUpdateMetadataSourceAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



59
60
61
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb', line 59

def self.authors
  ['Automattic']
end

.available_optionsObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb', line 28

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :po_file_path,
                                 env_name: 'FL_UPDATE_METADATA_SOURCE_PO_FILE_PATH',
                                 description: 'The path of the .po file to generate',
                                 type: String,
                                 verify_block: proc do |value|
                                   UI.user_error!("No .po file path given, pass using `po_file_path: 'file path'`") unless value && !value.empty?
                                 end),
    FastlaneCore::ConfigItem.new(key: :release_version,
                                 env_name: 'FL_UPDATE_METADATA_SOURCE_RELEASE_VERSION',
                                 description: 'The release version of the app (used for release notes)',
                                 verify_block: proc do |value|
                                   UI.user_error!("No release version given, pass using `release_version: 'version'`") unless value && !value.empty?
                                 end),
    FastlaneCore::ConfigItem.new(key: :source_files,
                                 env_name: 'FL_UPDATE_METADATA_SOURCE_SOURCE_FILES',
                                 description: 'Hash mapping keys to source file paths',
                                 type: Hash,
                                 verify_block: proc do |value|
                                   UI.user_error!("No source files given, pass using `source_files: { key: 'path' }`") unless value && !value.empty?
                                 end),
  ]
end

.deprecated?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb', line 67

def self.deprecated?
  true
end

.descriptionObject



20
21
22
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb', line 20

def self.description
  'Generates a .po file from source .txt files'
end

.detailsObject



24
25
26
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb', line 24

def self.details
  'Generates a .po file from source .txt files for localization via GlotPress.'
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb', line 63

def self.is_supported?(platform)
  [:android].include?(platform)
end

.outputObject



53
54
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb', line 53

def self.output
end

.return_valueObject



56
57
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb', line 56

def self.return_value
end

.run(params) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb', line 6

def self.run(params)
  UI.deprecated('`an_update_metadata_source` is deprecated. Please use `gp_update_metadata_source` instead.')

  other_action.(
    po_file_path: params[:po_file_path],
    source_files: params[:source_files],
    release_version: params[:release_version]
  )
end