summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/actions/build/statistics.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/actions/build/statistics.lua b/xmake/actions/build/statistics.lua
index 6efa272f5..993b95b9f 100644
--- a/xmake/actions/build/statistics.lua
+++ b/xmake/actions/build/statistics.lua
@@ -41,10 +41,14 @@ function post()
-- has been posted today or statistics is disable?
local outputdir = path.join(os.tmpdir(), "stats", os.date("%y%m%d"), projectname)
- if os.isdir(outputdir) or os.getenv("XMAKE_STATS") == "disable" then
+ local markfile = outputdir .. ".mark"
+ if os.isdir(outputdir) or os.isfile(markfile) or os.getenv("XMAKE_STATS") == "disable" then
return
end
+ -- mark as posted first, avoid to post it repeatly
+ io.writefile(markfile, "ok")
+
-- init argument list
local argv = {"lua", path.join(os.scriptdir(), "statistics.lua")}
for _, name in ipairs({"root", "file", "project", "backtrace", "verbose", "quiet"}) do