PHP 클래스 Platformsh\Cli\Local\LocalBuild

파일 보기 프로젝트 열기: commerceguys/platform-cli 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$config Platformsh\Cli\CliConfig
$fsHelper Platformsh\Cli\Helper\FilesystemHelper
$gitHelper Platformsh\Cli\Helper\GitHelper
$output Symfony\Component\Console\Output\OutputInterface
$settings
$shellHelper Platformsh\Cli\Helper\ShellHelper

공개 메소드들

메소드 설명
__construct ( array $settings = [], CliConfig $config = null, Symfony\Component\Console\Output\OutputInterface $output = null ) LocalBuild constructor.
build ( string $sourceDir, string $destination = null, array $apps = [] ) : boolean Build a project from any source directory, targeting any destination.
cleanArchives ( string $projectRoot, integer $maxAge = null, integer $keepMax = 10, boolean $quiet = true ) : int[] Remove old build archives.
cleanBuilds ( string $projectRoot, integer $maxAge = null, integer $keepMax = 10, boolean $includeActive = false, boolean $quiet = true ) : int[] Remove old builds.
getTreeId ( string $appRoot ) : string | false Get a hash of the application files.

보호된 메소드들

메소드 설명
buildApp ( LocalApplication $app, string $sourceDir, string $destination = null ) : boolean
cleanDirectory ( string $directory, integer $maxAge = null, integer $keepMax = 5, array $blacklist = [], boolean $quiet = true ) : int[] Remove old files from a directory.
getActiveBuilds ( string $projectRoot ) : array
runHook ( string | array $hook, string $dir ) : boolean Run a user-defined hook.
runPostBuildHooks ( array $appConfig, string $buildDir ) : boolean | null Run post-build hooks.
runPostDeployHooks ( array $appConfig, string $appDir ) : boolean | null Run post-deploy hooks.

메소드 상세

__construct() 공개 메소드

LocalBuild constructor.
public __construct ( array $settings = [], CliConfig $config = null, Symfony\Component\Console\Output\OutputInterface $output = null )
$settings array Possible settings: - clone (bool, default false) Clone the repository to the build directory before building, where possible. - copy (bool, default false) Copy files instead of symlinking them, where possible. - abslinks (bool, default false) Use absolute paths in symlinks. - no-archive (bool, default false) Do not archive or use an archive of the build. - no-cache (bool, default false) Disable the package cache (if relevant and if the package manager supports this). - no-clean (bool, default false) Disable cleaning up old builds or old build archives. - no-build-hooks (bool, default false) Disable running build hooks. - concurrency (int) Specify a concurrency for Drush Make, if applicable (when using the Drupal toolstack). - working-copy (bool, default false) Specify the --working-copy option to Drush Make, if applicable. - lock (bool, default false) Create or update a lock file via Drush Make, if applicable. - run-deploy-hooks (bool, default false) Run deploy hooks.
$config Platformsh\Cli\CliConfig Optionally, inject a specific CLI configuration object.
$output Symfony\Component\Console\Output\OutputInterface Optionally, inject a specific Symfony Console output object.

build() 공개 메소드

Build a project from any source directory, targeting any destination.
public build ( string $sourceDir, string $destination = null, array $apps = [] ) : boolean
$sourceDir string The absolute path to the source directory.
$destination string Where the web root(s) will be linked (absolute path).
$apps array An array of application names to build.
리턴 boolean

buildApp() 보호된 메소드

protected buildApp ( LocalApplication $app, string $sourceDir, string $destination = null ) : boolean
$app LocalApplication
$sourceDir string
$destination string
리턴 boolean

cleanArchives() 공개 메소드

Remove old build archives.
public cleanArchives ( string $projectRoot, integer $maxAge = null, integer $keepMax = 10, boolean $quiet = true ) : int[]
$projectRoot string
$maxAge integer
$keepMax integer
$quiet boolean
리턴 int[] The numbers of deleted and kept builds.

cleanBuilds() 공개 메소드

This preserves the currently active build.
사용 중단: No longer needed from 3.0.0.
public cleanBuilds ( string $projectRoot, integer $maxAge = null, integer $keepMax = 10, boolean $includeActive = false, boolean $quiet = true ) : int[]
$projectRoot string
$maxAge integer
$keepMax integer
$includeActive boolean
$quiet boolean
리턴 int[] The numbers of deleted and kept builds.

cleanDirectory() 보호된 메소드

Remove old files from a directory.
protected cleanDirectory ( string $directory, integer $maxAge = null, integer $keepMax = 5, array $blacklist = [], boolean $quiet = true ) : int[]
$directory string
$maxAge integer
$keepMax integer
$blacklist array
$quiet boolean
리턴 int[]

getActiveBuilds() 보호된 메소드

protected getActiveBuilds ( string $projectRoot ) : array
$projectRoot string
리턴 array The absolute paths to any active builds in the project.

getTreeId() 공개 메소드

This should change if any of the application files or build settings change.
public getTreeId ( string $appRoot ) : string | false
$appRoot string
리턴 string | false

runHook() 보호된 메소드

Run a user-defined hook.
protected runHook ( string | array $hook, string $dir ) : boolean
$hook string | array
$dir string
리턴 boolean

runPostBuildHooks() 보호된 메소드

Run post-build hooks.
protected runPostBuildHooks ( array $appConfig, string $buildDir ) : boolean | null
$appConfig array
$buildDir string
리턴 boolean | null False if the build hooks fail, true if they succeed, null if not applicable.

runPostDeployHooks() 보호된 메소드

Run post-deploy hooks.
protected runPostDeployHooks ( array $appConfig, string $appDir ) : boolean | null
$appConfig array
$appDir string
리턴 boolean | null False if the deploy hooks fail, true if they succeed, null if not applicable.

프로퍼티 상세

$config 보호되어 있는 프로퍼티

protected CliConfig,Platformsh\Cli $config
리턴 Platformsh\Cli\CliConfig

$fsHelper 보호되어 있는 프로퍼티

protected FilesystemHelper,Platformsh\Cli\Helper $fsHelper
리턴 Platformsh\Cli\Helper\FilesystemHelper

$gitHelper 보호되어 있는 프로퍼티

protected GitHelper,Platformsh\Cli\Helper $gitHelper
리턴 Platformsh\Cli\Helper\GitHelper

$output 보호되어 있는 프로퍼티

protected OutputInterface,Symfony\Component\Console\Output $output
리턴 Symfony\Component\Console\Output\OutputInterface

$settings 보호되어 있는 프로퍼티

protected $settings

$shellHelper 보호되어 있는 프로퍼티

protected ShellHelper,Platformsh\Cli\Helper $shellHelper
리턴 Platformsh\Cli\Helper\ShellHelper