Automatically send e-mail describing each cap deploy?

Railsters:

Here’s the command to get the revision log between a given revision and
the
state-of-the-art:

svn log http://my…repository/trunk --revision 42:head

Under our usual mix of Capistrano and SVN, how would one write a
Capistrano
task to…

  • collect the last deployment’s revision number
  • sample that log
  • e-mail the log to a list of e-mail addresses?

I attempted this script, and immediately got mired in the kind of absurd
details that other systems take for granted, but which Rails has taught
me
I’m doing something wrong. So I throw the question open…

(And, naturally, Googling for “send e-mail” is hopeless!:wink:


Phlip
http://www.oreilly.com/catalog/9780596510657/
“Test Driven Ajax (on Rails)”
assert_xpath, assert_javascript, & assert_ajax

Railsters:

Here’s the command to get the revision log between a given revision and the
state-of-the-art:

svn log http://my…repository/trunk --revision 42:head

Under our usual mix of Capistrano and SVN, how would one write a Capistrano
task to…

Write a “before_deploy” task which…

  • collect the last deployment’s revision number

Looks at #{deploy_to}/revisions.log and takes the last file which looks
like this:

2007-08-27 15:19:12 web 6604 20070827221715

The fourth record is the SVN revision.

  • sample that log

Apply the above to your svn command via “system” or IO.popen and capture
the output.

  • e-mail the log to a list of e-mail addresses?

Send it using net/smtp.