Class: Chandler::Commands::Push
- Inherits:
-
Object
- Object
- Chandler::Commands::Push
- Extended by:
- Forwardable
- Includes:
- Logging
- Defined in:
- lib/chandler/commands/push.rb
Overview
Iterates over a given array of tags, fetches the corresponding notes from the CHANGELOG, and creates (or updates) the release notes for that tag on GitHub.
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(tags:, config:) ⇒ Push
constructor
A new instance of Push.
Constructor Details
#initialize(tags:, config:) ⇒ Push
Returns a new instance of Push.
21 22 23 24 |
# File 'lib/chandler/commands/push.rb', line 21 def initialize(tags:, config:) @tags = @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
19 20 21 |
# File 'lib/chandler/commands/push.rb', line 19 def config @config end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
19 20 21 |
# File 'lib/chandler/commands/push.rb', line 19 def @tags end |
Instance Method Details
#call ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/chandler/commands/push.rb', line 26 def call exit_with_warning if .empty? each_tag_with_version_and_notes do |tag, version, notes| github.create_or_update_release( :tag => tag, :title => version.version_number, :description => notes ) end end |