Enhance package management in CraftCommand by merging craft-level packages and shared extensions into build options

This commit is contained in:
crazywhalecc
2026-04-29 15:09:21 +08:00
parent 269cd600f8
commit 02713fafb5
3 changed files with 36 additions and 0 deletions

View File

@@ -23,6 +23,9 @@ class PackageBuilder
/** @var int make jobs count */
public readonly int $concurrency;
/** @var array<string, mixed> Build arguments */
protected array $arguments = [];
/**
* @param array $options Builder options
*/
@@ -101,6 +104,16 @@ class PackageBuilder
return $this->options[$key] ?? $default;
}
public function setArgument(string $key, mixed $value): void
{
$this->arguments[$key] = $value;
}
public function getArgument(string $key, mixed $default = null): mixed
{
return $this->arguments[$key] ?? $default;
}
/**
* Deploy the binary file from src to dst.
*/