-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathchangelog.rake
46 lines (41 loc) · 1.15 KB
/
changelog.rake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# frozen_string_literal: true
task 'changelog:add' do
Dir.glob('gems/*').each do |gem_dir|
path = "#{gem_dir}/CHANGELOG.md"
File.open(path, 'w') do |file|
file.write(<<-TEXT)
Unreleased Changes
------------------
TEXT
end
changelog = BuildTools::Changelog.new(path: path)
changelog.add_entry(
type: :feature,
text: "Initial preview release of the `#{File.basename(gem_dir)}` gem."
)
changelog.version_unreleased_changes(
version: File.read("#{gem_dir}/VERSION").strip,
)
changelog.add_unreleased_changes_section
end
end
task 'changelog:sigv4' do
path = 'gems/aws-sigv4/CHANGELOG.md'
changelog = BuildTools::Changelog.new(path: path)
changelog.add_unreleased_changes_section
#changelog.version_unreleased_changes(
# version: '1.0.0',
# date: '2016-11-08',
#)
end
task 'changelog:version' do
Dir.glob('gems/*').each do |gem_dir|
next if File.basename(gem_dir) == 'aws-sigv4'
puts File.basename(gem_dir).inspect
end
end
task 'changelog:unreleased' do
path = 'gems/aws-sigv4/CHANGELOG.md'
changelog = BuildTools::Changelog.new(path: path)
puts changelog.unreleased_changes
end