Class: Changelog::Notifier::Entrypoints::Capistrano

Inherits:
Object
  • Object
show all
Defined in:
lib/changelog/notifier/entrypoints/capistrano.rb

Overview

Tries to publish the version’s release note after a successful Capistrano deployment.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance) ⇒ Capistrano

Returns a new instance of Capistrano.



11
12
13
# File 'lib/changelog/notifier/entrypoints/capistrano.rb', line 11

def initialize(instance)
  @capistrano = instance
end

Class Method Details

.run!(instance) ⇒ Object



22
23
24
25
# File 'lib/changelog/notifier/entrypoints/capistrano.rb', line 22

def self.run!(instance)
  entrypoint = Changelog::Notifier::Entrypoints::Capistrano.new(instance)
  entrypoint.publish_release_note
end

Instance Method Details

#publish_release_noteObject



15
16
17
18
19
20
# File 'lib/changelog/notifier/entrypoints/capistrano.rb', line 15

def publish_release_note
  ensure_release_has_changelog_file &&
    fetch_version_from_git_tags_and_commit_author &&
    parse_changelog_file &&
    run_through_adapters
end