Skip to content

Commit ec5e060

Browse files
committed
Fix the next version calculation
Version written in the book was one tag behind the one on the PDF at GitHub releases. Next tag needed to be calculated here.
1 parent 428d69a commit ec5e060

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Rakefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
namespace :book do
22

33
# Variables referenced for build
4-
version_string = `git describe --tags`.chomp
4+
version_string = `git describe --tags --abbrev=0`.chomp
55
if version_string.empty?
66
version_string = '0'
7+
else
8+
versions = version_string.split('.')
9+
version_string = versions[0] + '.' + versions[1] + '.' + versions[2].to_i.next.to_s
710
end
811
date_string = Time.now.strftime('%Y-%m-%d')
912
params = "--attribute revnumber='#{version_string}' --attribute revdate='#{date_string}'"

0 commit comments

Comments
 (0)