Home

Awesome

Dandelion

Gem Version Test Status

Incremental Git repository deployment.

Install

Ensure that Ruby >= 2.0.0 is installed, then run:

$ gem install dandelion

You may need to install pkg-config and cmake before installing Dandelion. They're likely available in your OS package manager. For example:

$ brew install pkg-config cmake

or

$ apt-get install pkg-config cmake

You may also need to install the Ruby headers if you're using a version of Ruby installed by your OS package manager (ruby-dev on Debian, ruby-all-dev on Ubuntu).

Config

Configuration options are specified in a YAML file (by default, the root of your Git repository is searched for a file named dandelion.yml).

Example:

adapter: sftp
host: example.com
username: user
password: pass
path: path/to/deployment

exclude:
    - .gitignore
    - dandelion.yml
    - dir/

additional:
    - config/auth.yml

Required:

Optional:

The additional section can either take a list of local file names or key-value formats if you want to upload something to a specific path:

additional:
    - localdir: remotedir
    - file.txt: remotedir/file.txt

The localdir in this example is relative to the repository root (ignoring local_path if you set it).

Each adapter also has additional required and optional configuration parameters (see below). Note that you can dynamically set configuration values by using environment variables. For example:

password: <%= ENV['DANDELION_PASSWORD'] %>

Adapters

There is support for multiple backend file transfer adapters. The configuration must specify one of these adapters and the set of additional parameters required by the given adapter.

SFTP: adapter: sftp (honors SSH config files)

Required:

Optional:

FTP: adapter: ftp

Required:

Optional:

FTPS: adapter: ftps

Required: (same as FTP)

Optional: (in addition to options for FTP)

Amazon S3: adapter: s3

Required:

Optional:

Usage

From within your Git repository, run:

$ dandelion deploy

This will deploy the local HEAD revision to the location specified in the config file. Dandelion keeps track of the currently deployed revision so that only files which have been added/changed/deleted need to be transferred.

You can specify the revision you wish to deploy and Dandelion will determine which files need to be transferred:

$ dandelion deploy <revision>

For a more complete summary of usage options, run:

$ dandelion -h
Usage: dandelion [options] <command> [<args>]
    -v, --version                    Display the current version
    -h, --help                       Display this screen
        --repo=[REPO]                Use the given repository
        --config=[CONFIG]            Use the given configuration file

Available commands:
    deploy
    init
    status

Note that when specifying the repository or configuration file, the given paths are relative to the current working directory (not the repository root).

To see the options for a particular command, run dandelion <command> -h:

$ dandelion deploy -h
Usage: dandelion deploy [options] [<revision>]
        --dry-run                    Show what would have been deployed