feat: FTP-Spiegel fuer externe 3D-Assets
- --publish laedt Workbench-Dateien per FTPS hoch und verifiziert sie durch Rueckdownload und SHA-256 - --sync laedt fehlende Assets vom Server, wenn die Workbench fehlt - Manifest um remote-Pfad ergaenzt, Manifest-Test auf 53 Assertions - Doku, Architektur (D13) und Roadmap aktualisiert
This commit is contained in:
parent
8861cbae92
commit
697274ce1b
7 changed files with 494 additions and 104 deletions
|
|
@ -49,11 +49,12 @@ func _run() -> void:
|
|||
|
||||
var seen_ids := {}
|
||||
var seen_targets := {}
|
||||
var seen_remotes := {}
|
||||
for entry: Variant in asset_list:
|
||||
_check(entry is Dictionary, "asset entry is an object")
|
||||
if not entry is Dictionary:
|
||||
continue
|
||||
_validate_asset(entry, seen_ids, seen_targets)
|
||||
_validate_asset(entry, seen_ids, seen_targets, seen_remotes)
|
||||
|
||||
_finish()
|
||||
|
||||
|
|
@ -61,7 +62,8 @@ func _run() -> void:
|
|||
func _validate_asset(
|
||||
asset: Dictionary,
|
||||
seen_ids: Dictionary,
|
||||
seen_targets: Dictionary
|
||||
seen_targets: Dictionary,
|
||||
seen_remotes: Dictionary
|
||||
) -> void:
|
||||
for key: String in [
|
||||
"id",
|
||||
|
|
@ -70,6 +72,7 @@ func _validate_asset(
|
|||
"format",
|
||||
"source",
|
||||
"target",
|
||||
"remote",
|
||||
"sha256",
|
||||
"bytes",
|
||||
"placement",
|
||||
|
|
@ -110,6 +113,19 @@ func _validate_asset(
|
|||
)
|
||||
seen_targets[target] = true
|
||||
|
||||
var remote := str(asset.get("remote", ""))
|
||||
_check(not remote.is_empty(), "asset '%s' has a remote path" % asset_id)
|
||||
_check(_is_relative_path(remote), "asset '%s' remote path is relative" % asset_id)
|
||||
_check(
|
||||
not remote.contains(".."),
|
||||
"asset '%s' remote path has no '..'" % asset_id
|
||||
)
|
||||
_check(
|
||||
not seen_remotes.has(remote),
|
||||
"asset '%s' remote path is unique" % asset_id
|
||||
)
|
||||
seen_remotes[remote] = true
|
||||
|
||||
var sha256 := str(asset.get("sha256", ""))
|
||||
_check(sha256.length() == 64, "asset '%s' has a SHA-256 length" % asset_id)
|
||||
_check(_is_hex(sha256), "asset '%s' has a hexadecimal SHA-256" % asset_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue