Add build function check for current OS and update validation logic

This commit is contained in:
crazywhalecc
2025-12-10 13:38:25 +08:00
parent 66d3af518b
commit 458af6ac78
5 changed files with 57 additions and 9 deletions

View File

@@ -127,6 +127,14 @@ abstract class Package
return false;
}
/**
* Check if the package has a build function for the current OS.
*/
public function hasBuildFunctionForCurrentOS(): bool
{
return isset($this->build_functions[PHP_OS_FAMILY]);
}
/**
* Get the name of the package.
*/