Class: Ucode::Commands::ReleaseCommand
- Inherits:
-
Object
- Object
- Ucode::Commands::ReleaseCommand
- Defined in:
- lib/ucode/commands/release.rb
Overview
ucode release — assemble the fontist.org-consumable release
tree (TODO 27).
Walks a directory of per-formula font subdirectories, audits each via Audit::LibraryAuditor, and passes the resulting Audit::Release::FormulaAudits list to Audit::Release::Emitter.
The release tree lives at <output_root>/font_audit_release/.
The CI collector job invokes this after matrix-auditing every
formula and pre-staging the universal-set directory.
Defined Under Namespace
Classes: FormulaSource, Result
Instance Method Summary collapse
Instance Method Details
#call(from:, output_root:, universal_set_root: nil, unicode_version: nil, recursive: true, brief: false, browse: true, source_config_sha256: nil, reference: nil, generated_at: Time.now.utc.iso8601) ⇒ Result
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/ucode/commands/release.rb', line 53 def call(from:, output_root:, universal_set_root: nil, unicode_version: nil, recursive: true, brief: false, browse: true, source_config_sha256: nil, reference: nil, generated_at: Time.now.utc.iso8601) formula_sources = discover_formulas(from) formulas = formula_sources.map do |src| summary = audit_formula(src.path, recursive: recursive, unicode_version: unicode_version, brief: brief, reference: reference) Ucode::Audit::Release::FormulaAudits.new(slug: src.slug, summary: summary) end emitter = Ucode::Audit::Release::Emitter.new( output_root: output_root, universal_set_root: universal_set_root, with_missing_glyph_pages: browse, ) emit_result = emitter.emit( formulas: formulas, unicode_version: unicode_version, generated_at: generated_at, source_config_sha256: source_config_sha256, ) Result.new( release_root: emit_result.release_root, formulas_total: emit_result.formulas_total, faces_total: emit_result.faces_total, formulas: formula_sources, universal_set_available: emit_result.universal_set_available, library_index_written: emit_result.library_index_written, manifest_written: emit_result.manifest_written, ) rescue StandardError => e Result.new(error: "#{e.class}: #{e.}") end |