Class: Fastlane::Actions::CheckBuildCacheWorkspaceAction

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

Class Method Summary collapse

Class Method Details

.authorsObject



15
16
17
# File 'lib/fastlane/plugin/build_cache/actions/check_build_cache_workspace_action.rb', line 15

def self.authors
  ["Fernando Saragoca"]
end

.available_optionsObject



23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/fastlane/plugin/build_cache/actions/check_build_cache_workspace_action.rb', line 23

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :workspace_path,
                            env_name: "BUILD_CACHE_WORKSPACE_PATH",
                         description: "Build cache workspace",
                                type: String),
    FastlaneCore::ConfigItem.new(key: :build_identifier,
                            env_name: "BUILD_CACHE_BUILD_IDENTIFIER",
                         description: "Identifier for current build",
                       default_value: Helper::BuildCacheHelper.build_identifier,
                                type: String)
  ]
end

.descriptionObject



11
12
13
# File 'lib/fastlane/plugin/build_cache/actions/check_build_cache_workspace_action.rb', line 11

def self.description
  "Check if cache for current build is avaiable"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/fastlane/plugin/build_cache/actions/check_build_cache_workspace_action.rb', line 37

def self.is_supported?(platform)
  true
end

.return_valueObject



19
20
21
# File 'lib/fastlane/plugin/build_cache/actions/check_build_cache_workspace_action.rb', line 19

def self.return_value
  "Boolean indicating if cache for current build is available"
end

.run(params) ⇒ Object



4
5
6
7
8
9
# File 'lib/fastlane/plugin/build_cache/actions/check_build_cache_workspace_action.rb', line 4

def self.run(params)
  workspace_path = params[:workspace_path]
  build_identifier = params[:build_identifier]
  full_path = File.join(workspace_path, build_identifier)
  File.file?(full_path)
end