Make docs optional in the tic80 updater
Older-style tic80 pipelines (bombexpert, mranderson) do not upload a docs zip; the unconditional extraction raised and aborted the whole update, so the new binary assets never got registered. Extract and register docs only when the zip/dir exists. Covered by new Tic80Service specs (optional docs + binary slug pickup). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,9 +4,12 @@ module SoftwareUpdater
|
||||
|
||||
private
|
||||
|
||||
# a docs opcionális: a régebbi sémájú tic80 pipeline-ok nem töltenek fel
|
||||
# docs zipet, e nélkül is regisztrálni kell a többi assetet
|
||||
def prepare_files(versioned)
|
||||
extract_zip_to_dir("#{versioned}.html.zip", versioned)
|
||||
extract_zip_to_dir("#{versioned}-docs.zip", "#{versioned}-docs")
|
||||
docs_zip = "#{versioned}-docs.zip"
|
||||
extract_zip_to_dir(docs_zip, "#{versioned}-docs") if File.file?(full_path(docs_zip))
|
||||
end
|
||||
|
||||
def parse_metadata(versioned)
|
||||
@@ -14,12 +17,14 @@ module SoftwareUpdater
|
||||
end
|
||||
|
||||
def asset_paths(versioned)
|
||||
{
|
||||
paths = {
|
||||
"cartridge" => full_path("#{versioned}.tic"),
|
||||
"source" => full_path("#{versioned}.lua"),
|
||||
"html" => full_path(versioned),
|
||||
"docs" => full_path("#{versioned}-docs")
|
||||
"html" => full_path(versioned)
|
||||
}
|
||||
docs_dir = "#{versioned}-docs"
|
||||
paths["docs"] = full_path(docs_dir) if dir_exists?(docs_dir)
|
||||
paths
|
||||
end
|
||||
|
||||
def parse_lua_metadata(source_path)
|
||||
|
||||
Reference in New Issue
Block a user