-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
lib/fastlane/plugin/carthage_cache/actions/carthage_cache_exist.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |