19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/gemkeeper/cli/commands/manifest/generate.rb', line 19
def call(lockfile_path: nil, **options)
lockfile_path = resolve_source_path(lockfile_path)
path = manifest_path(options)
manifest = ManifestReader.load(path)
manifest.clear! if options[:force]
result = ManifestBuilder.build(lockfile_path:, manifest:)
if result.empty?
puts "No internal gem sources found in #{lockfile_path}"
return
end
if result.any_changes?
manifest.save(path)
puts "Wrote #{path}"
end
print_summary(result, result.any_changes? ? nil : "Manifest up to date, no changes")
rescue UnresolvableGemError, ManifestConflictError => error
warn "Error: #{error.message}"
exit 1
end
|