Skip to content

Commit

Permalink
Reset CHANGELOG entries after release
Browse files Browse the repository at this point in the history
  • Loading branch information
AliSoftware committed Mar 1, 2017
1 parent e48b965 commit 486c0c9
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

---

## Master

### Bug Fixes

_None_

### Breaking Changes

_None_

### New Features

_None_

### Internal Changes

_None_

## 1.0.1

### Internal Changes
Expand Down
32 changes: 32 additions & 0 deletions rakelib/changelog.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
namespace :changelog do
desc 'Add the empty CHANGELOG entries after a new release'
task :reset do |task|
changelog = File.read('CHANGELOG.md')
abort('A Master entry already exists') if changelog =~ /^##\s*Master$/
changelog.sub!(/^##[^#]/, "#{header}\\0")
File.write('CHANGELOG.md', changelog)
end

def header
return <<-HEADER.gsub(/^\s*\|/,'')
|## Master
|
|### Bug Fixes
|
|_None_
|
|### Breaking Changes
|
|_None_
|
|### New Features
|
|_None_
|
|### Internal Changes
|
|_None_
|
HEADER
end
end

0 comments on commit 486c0c9

Please sign in to comment.