Skip to content

Commit

Permalink
Add CarthageCacheExistAction (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Crampton authored and thii committed Jul 25, 2016
1 parent a173784 commit 86cbd55
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions lib/fastlane/plugin/carthage_cache/actions/carthage_cache_exist.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module Fastlane
module Actions
class CarthageCacheExistAction < Action
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

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

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

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

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

0 comments on commit 86cbd55

Please sign in to comment.