aboutsummaryrefslogtreecommitdiff
path: root/zencore
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-06-13 21:23:09 +0200
committerDan Engelbrecht <[email protected]>2022-06-13 21:23:09 +0200
commita7b67de26eecd719f5754815beb17bc8fe10ed6c (patch)
tree1110a951b8716a85caff6e2a51cbd0a843d77ee4 /zencore
parentautomate bump version (diff)
downloadzen-a7b67de26eecd719f5754815beb17bc8fe10ed6c.tar.xz
zen-a7b67de26eecd719f5754815beb17bc8fe10ed6c.zip
read VERSION.txt in zencore:on_load
Diffstat (limited to 'zencore')
-rw-r--r--zencore/xmake.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/zencore/xmake.lua b/zencore/xmake.lua
index 63e874ac5..1e7a06080 100644
--- a/zencore/xmake.lua
+++ b/zencore/xmake.lua
@@ -4,6 +4,12 @@ target('zencore')
set_kind("static")
add_headerfiles("**.h")
add_configfiles("include/zencore/config.h.in")
+ add_configfiles("VERSION.txt", {onlycopy = true})
+ on_load(function (target)
+ local version = io.readfile("VERSION.txt")
+ version = version:match'^%s*v(.*%S)' or ''
+ target:set("version", version, { build = "%Y%m%d%H%M" })
+ end)
set_configdir("include/zencore")
add_files("**.cpp")
add_includedirs("include", {public=true})