Class: Dependabot::Vcpkg::FileUpdater

Inherits:
FileUpdaters::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/vcpkg/file_updater.rb

Instance Method Summary collapse

Instance Method Details

#updated_dependency_filesObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/dependabot/vcpkg/file_updater.rb', line 19

def updated_dependency_files
  updated_files = []

  # Handle vcpkg.json
  vcpkg_json_file = get_original_file(VCPKG_JSON_FILENAME)
  if vcpkg_json_file && rewrite?(vcpkg_json_file)
    updated_files << updated_file(
      file: vcpkg_json_file,
      content: updated_vcpkg_json_content(vcpkg_json_file)
    )
  end

  # Handle vcpkg-configuration.json
  vcpkg_config_file = get_original_file(VCPKG_CONFIGURATION_JSON_FILENAME)
  if vcpkg_config_file && rewrite?(vcpkg_config_file)
    updated_files << updated_file(
      file: vcpkg_config_file,
      content: updated_vcpkg_configuration_json_content(vcpkg_config_file)
    )
  end

  updated_files
end