summaryrefslogtreecommitdiff
path: root/xmake/modules/private/service/remote_build/server.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-09-14 23:17:05 +0800
committerruki <[email protected]>2023-09-14 23:17:05 +0800
commitca3b8d3ed2d69b3b907c3da535f76e4fc26f5e03 (patch)
tree30105dd801843ca603f2dfd637aa14027e96f2c0 /xmake/modules/private/service/remote_build/server.lua
parent631d88121448a1b08d67b57e134d34a35079d753 (diff)
improve xmakesrc path
Diffstat (limited to 'xmake/modules/private/service/remote_build/server.lua')
-rw-r--r--xmake/modules/private/service/remote_build/server.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/xmake/modules/private/service/remote_build/server.lua b/xmake/modules/private/service/remote_build/server.lua
index 6522fffb5..5c8bb3ce2 100644
--- a/xmake/modules/private/service/remote_build/server.lua
+++ b/xmake/modules/private/service/remote_build/server.lua
@@ -24,6 +24,7 @@ import("private.service.server_config", {alias = "config"})
import("private.service.message")
import("private.service.server")
import("private.service.remote_build.server_session")
+import("private.service.remote_build.filesync", {alias = "new_filesync"})
import("lib.detect.find_tool")
-- define module
@@ -47,6 +48,11 @@ function remote_build_server:init(daemon)
-- init timeout
self._SEND_TIMEOUT = config.get("remote_build.send_timeout") or config.get("send_timeout") or -1
self._RECV_TIMEOUT = config.get("remote_build.recv_timeout") or config.get("recv_timeout") or -1
+
+ -- init xmake filesync
+ local xmake_filesync = new_filesync(self:xmake_sourcedir(), path.join(self:workdir(), "xmakesrc_manifest.txt"))
+ xmake_filesync:ignorefiles_add(".git/**")
+ self._XMAKE_FILESYNC = xmake_filesync
end
-- get class
@@ -63,6 +69,16 @@ function remote_build_server:workdir()
return workdir
end
+-- get xmake sourcedir directory
+function server_session:xmake_sourcedir()
+ return path.join(self:workdir(), "xmake_source")
+end
+
+-- get filesync for xmakesrc
+function server_session:_xmake_filesync()
+ return self._XMAKE_FILESYNC
+end
+
-- on handle message
function remote_build_server:_on_handle(stream, msg)
local session_id = msg:session_id()