premake: fix oldRevNumber if a version.hpp in an old format exists.

This commit is contained in:
/dev/urandom 2016-01-03 14:54:35 +01:00
parent 1e1a415125
commit d8e1822c70
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E

View File

@ -25,6 +25,10 @@ newaction {
if oldVersionHeader ~=nil then if oldVersionHeader ~=nil then
local oldVersionHeaderContent = assert(oldVersionHeader:read('*a')) local oldVersionHeaderContent = assert(oldVersionHeader:read('*a'))
oldRevNumber = string.match(oldVersionHeaderContent, "#define REVISION (%d+)") oldRevNumber = string.match(oldVersionHeaderContent, "#define REVISION (%d+)")
if oldRevNumber = nil then
-- old version.hpp format?
oldRevNumber = "(none)"
end
end end
-- generate version.hpp with a revision number if not equal -- generate version.hpp with a revision number if not equal