Skip to content

Instantly share code, notes, and snippets.

@webflo
Created April 19, 2012 20:29
Show Gist options
  • Save webflo/2423942 to your computer and use it in GitHub Desktop.
Save webflo/2423942 to your computer and use it in GitHub Desktop.
<?php
/**
* Prepares one or more servers for deployment.
* It is safe to run this task on servers that have already been set up; it
* will not destroy any deployed revisions or data.
*
* @command
*/
function setup() {
$dirs = array($this->releases_path, $this->shared_path);
// $this->release_path has the same value across all sites invoked in this process,
// because the foreach in run() know about site context only.
$dirs_str = implode(' ', $dirs);
$this->run('mkdir -p ' . $dirs_str . ' && chmod g+w ' . $dirs_str);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment