Capistrano – deploy to specific revision (= tag, branch, hash)

To deploy something other than the HEAD, you must use the -s option.

Below are examples for git.

cap -s branch=my_branch deploy

cap -s tag=my_tag deploy

Advertisements

One Response

  1. Exactly the same for Mercurial (hg):

    cap -s branch=the-other-branch deploy.

    In my case I wanted to deploy to a staging environment so did:
    cap -s branch=experimental_branch staging deploy

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: