TYPO3\Surf\Task\CreateArchiveTask

class CreateArchiveTask

A task for creating an zip / tar.gz / tar.bz2 archive.

Needs the following options:

  • sourceDirectory - The directory which should be compressed.
  • targetFile - The target file. The file ending defines the format. Supported are .zip, .tar.gz, .tar.bz2.
  • baseDirectory - The base directory in the compressed archive in which all files should reside in.
  • exclude - An array of exclude patterns, as being understood by tar (optional)

This task needs the following unix command line tools:

  • tar / gnutar
  • zip
Example:
$workflow
->setTaskOptions(‘TYPO3SurfTaskCreateArchiveTask’, [

‘sourceDirectory’ => ‘/var/www/outerspace’, ‘targetFile’ => ‘/var/www/outerspace.zip’, ‘baseDirectory’ => ‘compressedSpace’, ‘exclude’ => [

*.bak’

]

]

);

property shell

protected ShellCommandService

execute(Node $node, Application $application, Deployment $deployment, $options = [])

Execute this task

Parameters:
checkOptionsForValidity($options)
Parameters:
  • $options (array) –
setShellCommandService(ShellCommandService $shellCommandService)
Parameters:
rollback(Node $node, Application $application, Deployment $deployment, $options = [])

Rollback this task

Parameters:
simulate(Node $node, Application $application, Deployment $deployment, $options = [])

Simulate this task (e.g. by logging commands it would execute)

Parameters:
configureOptions($options = [])
Parameters:
  • $options (array) –
Returns:

array

resolveOptions(OptionsResolver $resolver)
Parameters:
  • $resolver (OptionsResolver) –