From d8e1822c7002c1536822c975d97fd125d39fc9c5 Mon Sep 17 00:00:00 2001 From: /dev/urandom Date: Sun, 3 Jan 2016 14:54:35 +0100 Subject: [PATCH 1/2] 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 From 03e5adfdaffccd50900c120a5b424b36bcb1960c Mon Sep 17 00:00:00 2001 From: /dev/urandom Date: Sun, 3 Jan 2016 14:57:24 +0100 Subject: [PATCH 2/2] premake5: Fix typo. --- premake5.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/premake5.lua b/premake5.lua index 9c6d8e2f..a8c1d4b2 100644 --- a/premake5.lua +++ b/premake5.lua @@ -25,7 +25,7 @@ newaction { if oldVersionHeader ~=nil then local oldVersionHeaderContent = assert(oldVersionHeader:read('*a')) oldRevNumber = string.match(oldVersionHeaderContent, "#define REVISION (%d+)") - if oldRevNumber = nil then + if oldRevNumber == nil then -- old version.hpp format? oldRevNumber = "(none)" end