aboutsummaryrefslogtreecommitdiff
path: root/xmake.lua
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-01-24 20:43:42 +0100
committerStefan Boberg <[email protected]>2023-01-24 20:43:42 +0100
commitaa3212eb0ec193f4ac48b5274cc72c2a93da7592 (patch)
treeb814ed6d8b26dca752e25719d526c1326d989965 /xmake.lua
parentAdded version information to server executable (#215) (diff)
downloadzen-aa3212eb0ec193f4ac48b5274cc72c2a93da7592.tar.xz
zen-aa3212eb0ec193f4ac48b5274cc72c2a93da7592.zip
added precommit task
this makes it easier to trigger a local pre-commit check which is useful for ensuring clang-format etc has been applied properly prior to a commit
Diffstat (limited to 'xmake.lua')
-rw-r--r--xmake.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/xmake.lua b/xmake.lua
index 4469a3acc..1eeeb2a5a 100644
--- a/xmake.lua
+++ b/xmake.lua
@@ -184,6 +184,15 @@ task("bundle")
bundle()
end)
+task("precommit")
+ set_menu {
+ usage = "xmake precommit",
+ description = "Run required pre-commit steps (clang-format, etc)",
+ }
+ on_run(function ()
+ print(os.exec("pre-commit run --all-files"))
+ end)
+
task("test")
set_menu {
usage = "xmake runtest [core|store|server|integration|all]",