class Fastlane::Actions::EncryptGooglePlayCredentialsAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/react_native_release/actions/encrypt_google_play_credentials.rb, line 54
def self.authors
  # So no one will ever forget your contribution to fastlane :) You are awesome btw!
  ["cball", "isaiahgrey93"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/react_native_release/actions/encrypt_google_play_credentials.rb, line 37
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :json_path,
                                 env_name: "FL_ENCRYPT_GOOGLE_PLAY_CREDENTIALS_JSON_PATH",
                                 description: "Enter path to the json you downloaded from Google, or drop the file here",
                                 type: String)
  ]
end
description() click to toggle source

@!group Documentation

# File lib/fastlane/plugin/react_native_release/actions/encrypt_google_play_credentials.rb, line 28
def self.description
  "Encrypts credentials from Google Play and stores in the context repo."
end
details() click to toggle source
# File lib/fastlane/plugin/react_native_release/actions/encrypt_google_play_credentials.rb, line 32
def self.details
  # Optional:
  # this is your chance to provide a more detailed description of this action
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/react_native_release/actions/encrypt_google_play_credentials.rb, line 59
def self.is_supported?(platform)
  [:ios, :android].include?(platform)
end
return_value() click to toggle source
# File lib/fastlane/plugin/react_native_release/actions/encrypt_google_play_credentials.rb, line 46
def self.return_value
  # If your method provides a return value, you can describe here what it does
end
run(params) click to toggle source
# File lib/fastlane/plugin/react_native_release/actions/encrypt_google_play_credentials.rb, line 7
def self.run(params)
  key = Helper::ReactNativeReleaseHelper::GOOGLE_PLAY_CREDENTIALS_CRYPTEX_KEY
  json_path = params[:json_path]

  begin
    other_action.cryptex(
      type: "import",
      key: key,
      in: json_path
    )
  rescue => ex
    UI.abort_with_message!('Error encrypting Google Play Credentials.')
  end

  UI.success("Encrypted #{json_path} as #{key}")
end