Skip to content

Commit 5f14564

Browse files
authored
Merge pull request #1881 from petk/patch-next-tag
Fix the next version calculation
2 parents e75468d + ec5e060 commit 5f14564

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)