Class: Fastlane::Actions::CarthageCacheExistAction

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

Class Method Summary collapse

Class Method Details

.authorsObject



14
15
16
# File 'lib/fastlane/plugin/carthage_cache_res/actions/carthage_cache_exist.rb', line 14

def self.authors
  [%q{bfcrampton}]
end

.available_optionsObject



18
19
20
21
22
23
24
25
26
# File 'lib/fastlane/plugin/carthage_cache_res/actions/carthage_cache_exist.rb', line 18

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :bucket,
                            env_name: "CARTHAGE_CACHE_BUCKET",
                         description: "Amazon S3 bucket name which caches your Carthage build",
                            optional: false,
                                type: String)
  ]
end

.descriptionObject



10
11
12
# File 'lib/fastlane/plugin/carthage_cache_res/actions/carthage_cache_exist.rb', line 10

def self.description
  %q{Check if Carthage cache exists for Cartfile.resolved in Amazon S3}
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/fastlane/plugin/carthage_cache_res/actions/carthage_cache_exist.rb', line 28

def self.is_supported?(platform)
  [:ios, :mac, :tvos, :watchos].include?(platform)
end

.run(params) ⇒ Object



4
5
6
7
8
# File 'lib/fastlane/plugin/carthage_cache_res/actions/carthage_cache_exist.rb', line 4

def self.run(params)
  UI.message("Checking Amazon S3 for matching Carthage cache...")
  check = `bundle exec carthage_cache exist --bucket-name #{params[:bucket]} -s 2>&1`.chomp
  check == "true"
end