- Began refactoring TDF build scripts

- Separated TDF validation and mapping generation
- Moving away from the JSON mapping file, to a generated header file containing the TDF mapping.
- Other bits of tidying
This commit is contained in:
Nav
2023-12-12 23:19:21 +00:00
parent 275885e6ec
commit ec51a21846
10 changed files with 273 additions and 189 deletions

View File

@@ -20,6 +20,7 @@ class TargetDescriptionFile
public ?SimpleXMLElement $xml = null;
public ?string $targetName = null;
public ?string $configurationValue = null;
public ?string $targetArchitecture = null;
/** @var string[] */
@@ -71,6 +72,7 @@ class TargetDescriptionFile
if (!empty($this->deviceAttributesByName['name'])) {
$this->targetName = $device['name'];
$this->configurationValue = strtolower($device['name']);
}
if (!empty($this->deviceAttributesByName['architecture'])) {
@@ -480,6 +482,10 @@ class TargetDescriptionFile
$failures[] = 'Target name not found';
}
if (str_contains($this->targetName, ' ')) {
$failures[] = 'Target name cannot contain whitespaces';
}
if (empty($this->targetArchitecture)) {
$failures[] = 'Target architecture not found';
}