Sha256: 38c78d1608070d65cd33ac2c237b9f3ed714357244677aee277c2a1f5fa25a72

Contents?: true

Size: 1.09 KB

Versions: 7

Compression:

Stored size: 1.09 KB

Contents

######################################################################
#                         GIT NOTIFIER TASKS                         #
######################################################################
module ChickenSoup
  def vc_log
    `git log #{previous_revision}..#{current_revision} --pretty=format:%ai:::%an:::%s`
  end
end

Capistrano::Configuration.instance(:must_exist).load do
  after     'deploy:base',        'notify:via_git:tag'

  namespace :notify do
    namespace :via_git do
      desc <<-DESC
        Tags the deployed Git commit with the timestamp and environment it was deployed to.

        The tag is auto-pushed to whatever `remote` is set to as well as `origin`.
        Tag push happens in the background so it won't slow down deployment.
      DESC
      task :tag do
        tag_name = "deployment/#{rails_env}/#{latest_release_name}"

        `git tag -a -m "Tagging deploy to #{rails_env} at #{latest_release_name}" #{tag_name} #{branch}`
        `git push #{remote} --tags > /dev/null 2>&1 &`
        `git push origin --tags > /dev/null 2>&1 &`
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
chicken_soup-0.8.6 lib/chicken_soup/notifiers/git/git-tasks.rb
chicken_soup-0.8.5 lib/chicken_soup/notifiers/git/git-tasks.rb
chicken_soup-0.8.4 lib/chicken_soup/notifiers/git/git-tasks.rb
chicken_soup-0.8.3 lib/chicken_soup/notifiers/git/git-tasks.rb
chicken_soup-0.8.2 lib/chicken_soup/notifiers/git/git-tasks.rb
chicken_soup-0.8.1 lib/chicken_soup/notifiers/git/git-tasks.rb
chicken_soup-0.8.0 lib/chicken_soup/notifiers/git/git-tasks.rb