Method: Fastlane::Actions::UpdateAppIdentifierAction.resolve_path

Defined in:
fastlane/lib/fastlane/actions/update_app_identifier.rb

.resolve_path(path, xcodeproj_path) ⇒ Object

[View source]

51
52
53
54
55
56
57
58
59
60
# File 'fastlane/lib/fastlane/actions/update_app_identifier.rb', line 51

def self.resolve_path(path, xcodeproj_path)
  return nil unless path
  project_dir = File.dirname(xcodeproj_path)
  # SRCROOT, SOURCE_ROOT and PROJECT_DIR are the same
  %w{SRCROOT SOURCE_ROOT PROJECT_DIR}.each do |variable_name|
    path = path.sub("$(#{variable_name})", project_dir)
  end
  path = File.absolute_path(path, project_dir)
  path
end