-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVertofile
38 lines (27 loc) · 1013 Bytes
/
Vertofile
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
verto_version '0.10.0'
config {
version.prefix = 'v' # Adds a version_prefix
git.pull_before_tag_creation = true
git.push_after_tag_creation = true
}
context(branch('master')) {
before_command_tag_up {
command_options.add(filter: 'release_only')
}
before_tag_creation {
update_changelog(with: :merged_pull_requests_with_bracketed_labels,
confirmation: true,
filename: 'CHANGELOG.md')
git!('add CHANGELOG.md')
files_to_change_version_once = %w[lib/djin/version.rb djin.yml] + Dir['examples/**/*.yml'] + Dir['spec/support/fixtures/**/*.yml']
files_to_change_version_once.each do |filename|
file(filename).replace(latest_version.to_s, new_version.to_s)
end
file('README.md').replace_all(latest_version.to_s, new_version.to_s)
git!("add #{files_to_change_version_once.join(' ')} README.md")
sh!('bundle install')
sh!('rake install')
git!('add Gemfile.lock')
git!('commit -m "Bumps Version"')
}
}