Class: Fog::Rake::GithubReleaseTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/tasks/github_release_task.rb

Instance Method Summary collapse

Constructor Details

#initializeGithubReleaseTask

Returns a new instance of GithubReleaseTask.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/tasks/github_release_task.rb', line 9

def initialize
  desc "Update the changelog since the last release"
  task(:github_release) do

    File.open('CHANGELOG.md', 'r') do |file|
      file.each_line do |line|
        @current_line = line
         if release_header?
           create_release if !release_exists? && @release
           @release_tag = release_match[1]
           @release = line
         else
           @release << line
         end
      end
    end
  end
end