Deploying with Subversion tags in Capistrano

This is a 0.1 deploy method 🙂 I have tested this and we are using this version in production BUT its is not stupid proof…
In the ./config/deploy.rb
# Setup the repository with the TAG variable ()
tag = (ENV[”TAG”] || “”)
set :repository, “http://svn.mypostit.local/#{application}/tags/#{tag}”
set :repository, “http://svn.mypostit.local/#{application}/trunk” if tag.empty?
Now you can deploy with:
[deployer@heimdull ]# cap deploy TAG=’my_tag’
Wow is that easy.. If the TAG environment variable is empty then it will use the trunk for the repository or else it will use whatever you put in TAG.
I guess I should check if the tag exists before continuing … maybe 0.2 🙂
Advertisements

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: