BuildTask
MMO\admin\tasks · 1 symbol · generated 5 Oct 2026
BuildTask
BuildTask.php:48Turn a git commit into ONE immutable, versioned artifact: build/{name}-{version}-{commit}-{libraries}.tar.gz plus its sha256.
- Namespace
MMO\admin\tasks- Extends
- aDeployTask
Index
| buildFolder | ||
| buildOptions | ||
| built | ||
| commands | ||
| dirtyAccepted | ||
| exclude | ||
| fingerprints | ||
| git | ||
| include | ||
| manifest | ||
| apply($context) | ||
| assertWorkingTree($ref, $commit, $force) | Refuse to build from a working tree that does not match what is being exported. | |
| checkLibraries($context, $manifest) | Refuse to package a library with uncommitted changes -- unless told to go on. | |
| describeLibraries($libraries) | ||
| getArtifactFilename($manifest, $commit, $libraries) | ||
| getCommit($ref) | ||
| getDescription() | ||
| getIncludes() | The packages the application includes (Application::getIncludes), as name => version. | |
| getLibraries($manifest) | The libraries a release packages, and the state of each one's checkout. | |
| getLibrariesFingerprint($manifest) | What the libraries a release packages are built from, in a few characters: the commit of each one, or its version when it is no git checkout (a phar, a plain folder). | |
| getManifest() | ||
| isNeeded($context) | An artifact for this (version, commit) that already exists is reused as-is -- which is the point of building a deterministic artifact in the first place. | |
| key($commit, $version, $libraries) | ||
| librariesFilename($artifact) | ||
| loopOverlay($path) | ||
| overlay($context, $staging) | Copy the generated (untracked) assets into the exported tree, and hash what was copied. | |
| plan($context) | ||
| prime($context) | Fill in what the rest of the pipeline needs to describe itself: the version and commit being deployed, and the artifact if one already exists. | |
| readCheckout($folder) | ||
| readLibraries($artifact) | ||
| remember($key, $context) | ||
| verify($context) | ||
| __construct($git, $manifest, $buildFolder, $exclude, $include, $commands, $buildOptions) |
Properties10
buildFolder
- Type
- string
buildOptions
- Type
- array
built
- Type
- array
commands
- Type
- array
dirtyAccepted
exclude
- Type
- array
fingerprints
- Type
- WeakMap
git
- Type
- Repository
include
- Type
- array
manifest
Methods23
apply($context)
BuildTask.php:194assertWorkingTree($ref, $commit, $force)
BuildTask.php:367Refuse to build from a working tree that does not match what is being exported.
checkLibraries($context, $manifest)
BuildTask.php:474Refuse to package a library with uncommitted changes -- unless told to go on.
| $context | Context | |
| $manifest | PackageManifest | the project's. |
| returns | array | what the journal records of each library: {version, commit, branch, dirty}. |
| throws | when a library has uncommitted changes and nobody said to go on. |
describeLibraries($libraries)
BuildTask.php:507getArtifactFilename($manifest, $commit, $libraries)
BuildTask.php:111| $manifest | PackageManifest | |
| $commit | string | the project's |
| $libraries = '' | null | string | getLibrariesFingerprint ('' for none, null when a library has uncommitted changes) |
| returns | string | the artifact path for a given version, commit and libraries. |
getCommit($ref)
BuildTask.php:96getDescription()
BuildTask.php:76| returns | string |
getIncludes()
BuildTask.php:422The packages the application includes (Application::getIncludes), as name => version.
| returns | array | string> |
getLibraries($manifest)
BuildTask.php:398The libraries a release packages, and the state of each one's checkout.
| $manifest | PackageManifest | the project's. |
| returns | array | name => {version, folder, commit, branch, dirty, changes} |
getLibrariesFingerprint($manifest)
BuildTask.php:125What the libraries a release packages are built from, in a few characters: the commit of each one, or its version when it is no git checkout (a phar, a plain folder). Two builds of one project commit with the same fingerprint package the same code.
| $manifest | PackageManifest | the project's. |
| returns | null | string | 12 hex characters ('' when the project packages no library), null when a library has uncommitted changes: its phar then holds code no commit names, and nothing built from it may be reused. |
getManifest()
BuildTask.php:78| returns | PackageManifest |
isNeeded($context)
BuildTask.php:167An artifact for this (version, commit) that already exists is reused as-is -- which is the point of building a deterministic artifact in the first place. prime still runs, so the rest of the pipeline knows the version and the checksum even when there is nothing to build.
key($commit, $version, $libraries)
BuildTask.php:529librariesFilename($artifact)
BuildTask.php:518loopOverlay($path)
BuildTask.php:324overlay($context, $staging)
BuildTask.php:283Copy the generated (untracked) assets into the exported tree, and hash what was copied.
plan($context)
BuildTask.php:177prime($context)
BuildTask.php:146Fill in what the rest of the pipeline needs to describe itself: the version and commit being deployed, and the artifact if one already exists. Called by BOTH plan and apply, so a dry run's plan shows the real release name instead of a blank -- and the later tasks can tell whether they would have anything to do at all.
| $context | Context | |
| returns | PackageManifest |
readCheckout($folder)
BuildTask.php:437| $folder | null | string | a library's folder. |
| returns | array | string|null, commit: string|null, branch: string|null, dirty: int, changes: string[]} the commit and branch it is on (null when it is no git checkout, or a phar), and its uncommitted changes -- those under build/ aside: that is where its own phar is written, and some libraries do not ignore it. |
readLibraries($artifact)
BuildTask.php:521remember($key, $context)
BuildTask.php:384verify($context)
BuildTask.php:338__construct($git, $manifest, $buildFolder, $exclude, $include, $commands, $buildOptions)
BuildTask.php:58Inherited members (38)
| Constants | Declared by | Description | |
|---|---|---|---|
ALERT | iLogLevel | Alert: Action must be taken immediately. | |
ALL | iLogLevel | Mask for all | |
ALL_PLUS | iLogLevel | debug everything | |
BACKTRACE | iLogLevel | ||
CRITICAL | iLogLevel | Critical: Critical conditions. | |
DEBUG | iLogLevel | Debug: Detailed debug information. | |
DEEP | iLogLevel | debug everything with arguments | |
EMERGENCY | iLogLevel | Emergency: System is unusable. | |
ERROR | iLogLevel | Error: Runtime errors that do not require immediate action but should typically be logged and monitored. | |
ERROR_PLUS | iLogLevel | Mask for all error | |
FATAL | iLogLevel | Mask for all fatal error | |
INFO | iLogLevel | Info: Interesting events. | |
INFO_PLUS | iLogLevel | Mask for all errors/warning/notices/info | |
MEMORY | iLogLevel | include backtrace object | |
NOTICE | iLogLevel | Notice: Normal but significant events. | |
NOTICE_PLUS | iLogLevel | Mask for all errors/warning/notices/info | |
TRACE | iLogLevel | include backtrace as origins | |
WARNING | iLogLevel | Warning: Exceptional occurrences that are not errors. | |
WARNING_PLUS | iLogLevel | Mask for all errors and warnings |
| Properties | Declared by | Description | |
|---|---|---|---|
verbosity | aDeployTask |
| Methods | Declared by | Description | |
|---|---|---|---|
alert($message, $context) | aDeployTask | Action must be taken immediately. | |
backtraces($message, $context) | aDeployTask | Force-log a message at INFO level together with a full stack trace/memory snapshot (iLogLevel::BACKTRACE), bypassing the verbosity mask entirely (any non-zero verbosity is enough to trigger it). | |
critical($message, $context) | aDeployTask | Critical conditions. No-op if CRITICAL is currently filtered out by the verbosity mask. | |
debug($message, $context) | aDeployTask | Detailed debug information. | |
debugName() | aDeployTask | ||
emergency($message, $context) | aDeployTask | System is unusable. No-op if EMERGENCY is currently filtered out by the verbosity mask. | |
error($message, $context) | aDeployTask | Runtime errors that do not require immediate action but should typically be logged and monitored. | |
getName() | aDeployTask | ||
getVerbosity() | aDeployTask | ||
info($message, $context) | aDeployTask | Interesting events. No-op if INFO is currently filtered out by the verbosity mask. | |
isChange() | aDeployTask | Whether running this task CHANGES anything. | |
isRollbackCritical() | aDeployTask | ||
log($level, $message, $context) | aDeployTask | Logs with an arbitrary level. | |
notice($message, $context) | aDeployTask | Normal but significant events. | |
rollback($context) | aDeployTask | Undo this task. Called by the runner, in reverse order, for every task already applied when a later one failed. | |
setVerbosity($verb) | aDeployTask | Set the current verbosity mask, replacing whatever it was before. | |
testVerbosity($level) | aDeployTask | Test whether a given level (or set of levels) is currently enabled by this instance's verbosity mask. | |
warning($message, $context) | aDeployTask | Exceptional occurrences that are not errors. |