From d8e1822c7002c1536822c975d97fd125d39fc9c5 Mon Sep 17 00:00:00 2001 From: /dev/urandom Date: Sun, 3 Jan 2016 14:54:35 +0100 Subject: [PATCH] premake: fix oldRevNumber if a version.hpp in an old format exists. --- premake5.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/premake5.lua b/premake5.lua index ecb9eb8b..9c6d8e2f 100644 --- a/premake5.lua +++ b/premake5.lua @@ -25,6 +25,10 @@ newaction { if oldVersionHeader ~=nil then local oldVersionHeaderContent = assert(oldVersionHeader:read('*a')) oldRevNumber = string.match(oldVersionHeaderContent, "#define REVISION (%d+)") + if oldRevNumber = nil then + -- old version.hpp format? + oldRevNumber = "(none)" + end end -- generate version.hpp with a revision number if not equal