diff options
| author | ruki <[email protected]> | 2017-09-14 22:52:29 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-09-14 11:14:55 +0800 |
| commit | 8c37044233447d2d6559d598454650ff53db0ceb (patch) | |
| tree | 8a79c926df0ac7b265d969d2e04275b643869f2c | |
| parent | 9b5dfae7e222ad3cdd293cbc962b6b9dc96590a6 (diff) | |
improve statistics
| -rw-r--r-- | scripts/installer.nsi | 2 | ||||
| -rw-r--r-- | xmake/actions/build/statistics.lua | 17 |
2 files changed, 12 insertions, 7 deletions
diff --git a/scripts/installer.nsi b/scripts/installer.nsi index c87019b20..c7d17e896 100644 --- a/scripts/installer.nsi +++ b/scripts/installer.nsi @@ -79,7 +79,7 @@ Section "xmake (required)" Installer SetOutPath $INSTDIR
; Put file there
- File /r /x ".DS_Store" "..\xmake\*.*"
+ File /r /x ".DS_Store" /x "*.swp" "..\xmake\*.*"
File "..\*.md"
File "..\core\build\xmake.exe"
File /r /x ".DS_Store" "..\winenv" ; put bin\unzip, bin\curl
diff --git a/xmake/actions/build/statistics.lua b/xmake/actions/build/statistics.lua index 1d82c80e7..6efa272f5 100644 --- a/xmake/actions/build/statistics.lua +++ b/xmake/actions/build/statistics.lua @@ -27,7 +27,7 @@ import("core.base.option") -- post statistics info and only post once everyday when building each project -- --- clone the xmake-stats repo to update the traffic(git clones) info in github +-- clone the xmake-stats(only an empty repo) to update the traffic(git clones) info in github -- -- the traffic info in github (just be approximate numbers): -- @@ -56,11 +56,16 @@ function post() end end - -- post it in background - local proc = process.openv("xmake", argv, os.tmpfile() .. ".stats.log") - if proc ~= nil then - process.close(proc) - end + -- try to post it in background + try + { + function () + local proc = process.openv("xmake", argv, path.join(os.tmpdir(), projectname .. ".stats.log")) + if proc ~= nil then + process.close(proc) + end + end + } end -- the main function |
