Commit 09ed24a8 authored by Greg Williams's avatar Greg Williams
Browse files

Fixed version info generation issue when file does not exist to compare.

parent 4352d9ac
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -20,7 +20,8 @@ header_contents << "#define KINETIC_C_PROTOCOL_VERSION \"#{protocol_version}\"\n
header_contents << "#define KINETIC_C_REPO_HASH \"#{commit_hash}\"\n"
header_contents << "#endif"

current_contents = File.readlines(info_header_file)
current_contents = []
current_contents = File.readlines(info_header_file) if File.exist?(info_header_file)

if (current_contents != header_contents)
  File.open(info_header_file, "w+") do |f|