- 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:
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user