We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f9f055 commit 98c116cCopy full SHA for 98c116c
Rakefile
@@ -4,7 +4,10 @@ namespace :book do
4
5
`cp progit.asc progit.asc.bak`
6
begin
7
- version_string = `git describe --tags`.chomp
+ version_string = ENV['TRAVIS_TAG'] || `git describe --tags`.chomp
8
+ if version_string.empty?
9
+ version_string = '0'
10
+ end
11
text = File.read('progit.asc')
12
new_contents = text.gsub("$$VERSION$$", version_string).gsub("$$DATE$$", Time.now.strftime("%Y-%m-%d"))
13
File.open("progit.asc", "w") {|file| file.puts new_contents }
0 commit comments