Sha256: a7f792b405c9a96833513184a92311eff963e096a713a1cbafa24c58c80cc7d7

Contents?: true

Size: 717 Bytes

Versions: 2

Compression:

Stored size: 717 Bytes

Contents

namespace :show do
  task :me do
    set :task_name, task_call_frames.first.task.fully_qualified_name
  end
end

namespace :deploy do
  desc "Send email notification of deployment (only send variables you want to be in the email)"
  task :notify, :roles => :app do
    show.me  # this sets the task_name variable
    
    # Set the release notes
    git_commits_range = "#{previous_revision.strip}..#{current_revision.strip}"
    git_log = `git log --pretty=oneline --abbrev-commit #{git_commits_range}` # executes in local shell
    set :release_notes, git_log.blank? ? "No Changes since last deploy." : "from git:\n" + git_log
    
    mailer.send_notification_email(self)
  end
end

after "deploy", "deploy:notify"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
capistrano_mailer-4.1.0.pre1 lib/capistrano/mailer_recipes.rb
capistrano_mailer-4.0.2 lib/capistrano/mailer_recipes.rb