PHP Class PackageGenerator

A package file is a .tar.gz file of the project, ready to be uploaded to the server These package generators can be used by applicable deployment backends.
Afficher le fichier Open project: silverstripe/deploynaut Class Usage Examples

Protected Properties

Свойство Type Description
$cache

Méthodes publiques

Méthode Description
generatePackage ( string $sha, string $baseDir, $outputFilename, DeploynautLogFile $log ) : boolean Generate the package file, saving to the given location
getCache ( )
getIdentifier ( ) Return a string that uniquely identifies this package generator.
getPackageFilename ( string $identifier, string $sha, string $repositoryDir, DeploynautLogFile $log ) : string Generate or retrieve a package from the cache
setCache ( PackageCache $cache )

Method Details

generatePackage() abstract public méthode

Generate the package file, saving to the given location
abstract public generatePackage ( string $sha, string $baseDir, $outputFilename, DeploynautLogFile $log ) : boolean
$sha string
$baseDir string string The base directory of the project, checked out from git.
$outputFilename string The filename to write to.
$log DeploynautLogFile
Résultat boolean True on success

getCache() public méthode

public getCache ( )

getIdentifier() abstract public méthode

This will be used as part of cache keys; if meaningful changes to the operation of the generator are made, then the identifier should change. Note there is no need to include the classname in the identifier; callers to getIdentifier() should be responsible for disambiguating based on class.
abstract public getIdentifier ( )

getPackageFilename() public méthode

Generate or retrieve a package from the cache
public getPackageFilename ( string $identifier, string $sha, string $repositoryDir, DeploynautLogFile $log ) : string
$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
Résultat string

setCache() public méthode

public setCache ( PackageCache $cache )
$cache PackageCache

Property Details

$cache protected_oe property

protected $cache