Property | Type | Description | |
---|---|---|---|
$baseDir | |||
$cacheSize |
Method | Description | |
---|---|---|
getPackageFilename ( PackageGenerator $generator, string $identifier, string $sha, string $repositoryDir, DeploynautLogFile $log ) : string | Return the filename of the generated package, retrieving from cache or generating as necessary | |
setBaseDir ( string $baseDir ) | The base directory to store cached packages in. | |
setCacheSize ( integer $cacheSize ) | Set the maximum number of items that will be stored in the package cache. |
Method | Description | |
---|---|---|
reduceDirSizeTo ( string $dir, integer $count, DeploynautLogFile $log ) | Delete items in this directory until the number of items is <= $count. | |
sanitiseDirName ( string $identifier ) | Take the identifier an make it safe to use as a directory name. |
public getPackageFilename ( PackageGenerator $generator, string $identifier, string $sha, string $repositoryDir, DeploynautLogFile $log ) : string | ||
$generator | PackageGenerator | The generator to use to create cache entries. |
$identifier | string | A unique identifier for the generator; used to partition the cache |
$sha | string | The SHA of the commit to be deployed |
$repositoryDir | string | The directory where the repository resides |
$log | DeploynautLogFile | The log to write status output to, including package-generation commands |
return | string |
protected reduceDirSizeTo ( string $dir, integer $count, DeploynautLogFile $log ) | ||
$dir | string | The directory to remove items from |
$count | integer | The maximum number of .tar.gz files that can appear in that directory |
$log | DeploynautLogFile | The log to send removal status messages to |
protected sanitiseDirName ( string $identifier ) | ||
$identifier | string | The unsanitised directory name. |
public setBaseDir ( string $baseDir ) | ||
$baseDir | string | The base directory |
public setCacheSize ( integer $cacheSize ) | ||
$cacheSize | integer | the number of package files to keep. |