Skip to content

Commit 031f8c0

Browse files
committed
added automatic version bumping using 'bump' gem
add bump gem to generated Gemfile and generate Rakefile in new projects
1 parent 2c737ba commit 031f8c0

File tree

5 files changed

+29
-1
lines changed

5 files changed

+29
-1
lines changed

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ gem 'thor'
66
gem 'erb'
77
gem 'dotenv'
88
gem 'homebus', git: 'https://github.com/HomeBusProjects/ruby-homebus', branch: 'main'
9+
gem 'bump'

Rakefile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
require "bump/tasks"
2+
3+
#
4+
# do not always tag the version
5+
# Bump.tag_by_default = false
6+
#
7+
# bump the version in additional files
8+
# Bump.replace_in_default = ["Readme.md"]
9+
#
10+
# Maintain changelog:
11+
# Bump.changelog = true
12+
# Opens the changelog in an editor when bumping
13+
# Bump.changelog = :editor

lib/homebus-cli/project.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def create_subdirectories
4040
end
4141

4242
def top_level
43-
top_files = %w/Gemfile README.md .gitignore .ruby-version/
43+
top_files = %w/Gemfile Rakefile README.md .gitignore .ruby-version/
4444
top_files.each do |f|
4545
template("#{f}.tt", "#{pathname}/#{f}")
4646
end

lib/homebus-cli/templates/Gemfile.tt

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ gemspec
44

55
gem 'dotenv'
66
gem 'homebus', git: 'https://github.com/HomeBusProjects/ruby-homebus', branch: 'main'
7+
gem 'bump'

lib/homebus-cli/templates/Rakefile.tt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
require "bump/tasks"
2+
3+
#
4+
# do not always tag the version
5+
# Bump.tag_by_default = false
6+
#
7+
# bump the version in additional files
8+
# Bump.replace_in_default = ["Readme.md"]
9+
#
10+
# Maintain changelog:
11+
# Bump.changelog = true
12+
# Opens the changelog in an editor when bumping
13+
# Bump.changelog = :editor

0 commit comments

Comments
 (0)