namespace utils
get_current_path
This tasks returns the current release path.
Usage
Output
The newest release path is printed on console.
upload_file
This uploads a file to the server specified in your stage configuration.
Configuration
If the file path contains your :copy_source
(for example htdocs/newfile.html) path this path will not be used on the server.
Usage
The task should be used in your project root. There are two ways to use this task:
Specify file path interactively
Then the task will ask you for a file name.
Specify file path as task argument
Output
download_file
This tasks downloads the specified file from the server in the specified stage.
Variables
The variable :deploy_to
defines the path in which the file to download is requested.
The variable :local_dump_path
defines where the file will be downloaded.
Use following as code example:
Usage
Use this task in the project root.
There are two ways to use this task:
Specify file path interactively
Then the task will ask you for a file name.
Specify file path as task argument
Output
Additional informations
If the file exists already in your :local_dump_path
it will be overwritten.
watch_file
This task watches a file on the server (with tail -f). This is typically used to inspect logfiles of running servers.
Configuration
Variables
If no argument is specified, the variable :watch_file_name
will be used.
Requirements
The capistrano user on the server needs to be able to access the file. File permissions on the server need to be setup correctly.
Usage
Use this task in your project root.
If :watch_file_name
variable is not set then the file path on the server has to be an argument.
or with the variable set
Output
The output of file is watched with tail -f
Additional information
As with all command tasks, you can use CTRL+C to end the process.
rsync
This task copies data to the server with rsync.
Configuration
The task uses the following variables:
:rsync_roles
- The capistrano roles to use. If not set then:app
is used:rsync_path
- the directory of the local file(s) ( if not set, then:copy_source
is used):rsync_exclude
- file(s) that should be excluded:release_path
- Path on the server where files are uploaded or synced:ssh_options
- hash, specify ssh key files with:keys
ssh user with:user
Usage
Task is used in project root.
Output
create_custom_directories
Creates a new directory in the shared directory on the server.
Configuration
The variable :deploy_path
is being used.
Use following as code example:
Usage
Use this task in the project root. This task can be used in two ways:
Interactively
And then type the directories - separated by whitespace - that should be created.