Class: Fastlane::Actions::RustoreDeveloperCreateVersionAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/rustore_developer/actions/rustore_developer_create_version_action.rb

Class Method Summary collapse

Class Method Details

.authorsObject



22
23
24
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_create_version_action.rb', line 22

def self.authors
  ["RimiX2"]
end

.available_optionsObject



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_create_version_action.rb', line 35

def self.available_options
  [
      FastlaneCore::ConfigItem.new(key: :package,
                                   env_name: "RUSTORE_PACKAGE_NAME",
                                   description: "Android app package name (FQDN)",
                                   optional: false,
                                   type: String),
      FastlaneCore::ConfigItem.new(key: :publish,
                                   env_name: "RUSTORE_PUBLISH_TYPE",
                                   description: "Publication mechanism (MANUAL | INSTANTLY)",
                                   optional: false,
                                   default_value: 'MANUAL',
                                   type: String),
      FastlaneCore::ConfigItem.new(key: :token,
                                   description: "Access token",
                                   optional: false,
                                   sensitive: true,
                                   default_value: Actions.lane_context[SharedValues::RUSTORE_DEVELOPER_ACCESS_TOKEN],
                                   verify_block: proc do |value|
                                     UI.user_error!("No access token given, pass using `token: 'token_value'`") unless value && !value.empty?
                                   end,
                                   type: String),
      FastlaneCore::ConfigItem.new(key: :news,
                                   description: "What's new listing",
                                   optional: true,
                                   type: String),
  ]
end

.descriptionObject



18
19
20
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_create_version_action.rb', line 18

def self.description
  "RUSTORE: Create new deployment version (draft)"
end

.detailsObject



30
31
32
33
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_create_version_action.rb', line 30

def self.details
  # Optional:
  ""
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


64
65
66
67
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_create_version_action.rb', line 64

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

.return_valueObject



26
27
28
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_create_version_action.rb', line 26

def self.return_value
  "Created version id"
end

.run(params) ⇒ Object



12
13
14
15
16
# File 'lib/fastlane/plugin/rustore_developer/actions/rustore_developer_create_version_action.rb', line 12

def self.run(params)
  version = Helper::RustoreDeveloperHelper.createVersion(params[:token], params[:package], params[:publish], params[:news] )
  Actions.lane_context[SharedValues::RUSTORE_DEVELOPER_DRAFT_VERSION] = version.to_s
  return version
end