Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (13 sloc) 455 Bytes
timestamp = Time.now.strftime("%Y-%m-%d %H:%M")
commit = nil
begin
commit_lines = `git branch -v --no-color`.to_a
commit = commit_lines.grep(/^\* /).first.split[2]
rescue Exception => e
$stderr.puts "Had a problem when finding out commit info - #{e} (THIS IS NOT A CATASTROPHIC ERROR, you can still build Ioke)"
commit = "???"
end
File.open("version_data.properties", "w") do |f|
f.puts("DATE=#{timestamp}")
f.puts("COMMIT=#{commit}")
end
Jump to Line
Something went wrong with that request. Please try again.