Class: Fastlane::Actions::HaltGooglePlayReleaseAction

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

Class Method Summary collapse

Class Method Details

.authorsObject



28
29
30
# File 'lib/fastlane/plugin/google_play_track_updater/actions/halt_google_play_release_action.rb', line 28

def self.authors
  ['Takuma Homma']
end

.available_optionsObject



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/fastlane/plugin/google_play_track_updater/actions/halt_google_play_release_action.rb', line 40

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :package_name,
                                 env_name: 'HALT_GOOGLE_PLAY_RELEASE_PACKAGE_NAME',
                                 description: 'The package name of the application. e.g. \'com.example.app\'',
                                 optional: false,
                                 type: String),
    FastlaneCore::ConfigItem.new(key: :track,
                                 env_name: "HALT_GOOGLE_PLAY_RELEASE_TRACK",
                                 description: 'The track of the application. The available tracks are: production, beta, alpha, internal',
                                 optional: false,
                                 type: String),
    FastlaneCore::ConfigItem.new(key: :version_name,
                                 env_name: 'HALT_GOOGLE_PLAY_RELEASE_VERSION_NAME',
                                 description: 'The version name to update. e.g. \'1.0.0\'',
                                 optional: false,
                                 type: String),
    FastlaneCore::ConfigItem.new(key: :json_file_path,
                                 env_name: 'HALT_GOOGLE_PLAY_RELEASE_JSON_FILE_PATH',
                                 description: 'The path to a file containing service account or external account JSON, used to authenticate with Google',
                                 optional: true,
                                 type: String),
    FastlaneCore::ConfigItem.new(key: :json_key_data,
                                 env_name: 'HALT_GOOGLE_PLAY_RELEASE_JSON_KEY_DATA',
                                 description: 'The file data containing service account or external account JSON, used to authenticate with Google',
                                 optional: true,
                                 type: String)

  ]
end

.descriptionObject



24
25
26
# File 'lib/fastlane/plugin/google_play_track_updater/actions/halt_google_play_release_action.rb', line 24

def self.description
  'Halts an active staged rollout or completed for a specific version on a Google Play track.'
end

.detailsObject



36
37
38
# File 'lib/fastlane/plugin/google_play_track_updater/actions/halt_google_play_release_action.rb', line 36

def self.details
  'Halts an active staged rollout or completed for a specific version on a Google Play track.'
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


71
72
73
74
75
76
77
78
# File 'lib/fastlane/plugin/google_play_track_updater/actions/halt_google_play_release_action.rb', line 71

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, :mac, :android].include?(platform)

  platform == :android
end

.return_valueObject



32
33
34
# File 'lib/fastlane/plugin/google_play_track_updater/actions/halt_google_play_release_action.rb', line 32

def self.return_value
  # If your method provides a return value, you can describe here what it does
end

.run(params) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/fastlane/plugin/google_play_track_updater/actions/halt_google_play_release_action.rb', line 7

def self.run(params)
  package_name = params[:package_name]
  track = params[:track]
  version_name = params[:version_name]
  json_file_path = params[:json_file_path]
  json_key_data = params[:json_key_data]
  client = Fastlane::GooglePlayTrackUpdater::GooglePlayClient.new(
    json_file_path: json_file_path,
    json_key_data: json_key_data
  )
  client.halt_release(
    package_name: package_name,
    track: track,
    version_name: version_name
  )
end