summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-04-13 23:07:30 +0800
committerruki <[email protected]>2022-04-13 23:07:30 +0800
commit93c10276f18c7ed6e119250ab7cd05df007989f9 (patch)
tree8c0b50dcbdf6e74fdeef430d1850a1b48c90b1a5
parentc6c62b573fb79dbf89733591f46ce92e10ee6fab (diff)
improve push
-rw-r--r--xmake/modules/devel/git/push.lua8
-rw-r--r--xmake/modules/private/service/config.lua4
-rw-r--r--xmake/modules/private/service/remote_build/client.lua3
3 files changed, 4 insertions, 11 deletions
diff --git a/xmake/modules/devel/git/push.lua b/xmake/modules/devel/git/push.lua
index aaeee5c28..ee8e8b968 100644
--- a/xmake/modules/devel/git/push.lua
+++ b/xmake/modules/devel/git/push.lua
@@ -32,7 +32,7 @@ import("branch", {alias = "git_branch"})
--
-- import("devel.git")
--
--- git.push(url, {branch = "master, remote_branch = "xxx", force = true, "repodir = "/tmp/xmake", password = "xxx"})
+-- git.push(url, {branch = "master, remote_branch = "xxx", force = true, "repodir = "/tmp/xmake"})
--
-- @endcode
--
@@ -50,9 +50,5 @@ function main(url, opt)
branch = branch .. ":" .. opt.remote_branch
end
table.insert(argv, branch)
- local stdin
- if opt.password then
- stdin = opt.password .. "\n"
- end
- os.vrunv(git.program, argv, {curdir = opt.repodir, stdin = stdin})
+ os.vrunv(git.program, argv, {curdir = opt.repodir})
end
diff --git a/xmake/modules/private/service/config.lua b/xmake/modules/private/service/config.lua
index 90492392c..4a3054d00 100644
--- a/xmake/modules/private/service/config.lua
+++ b/xmake/modules/private/service/config.lua
@@ -35,9 +35,7 @@ function _generate_configfile()
},
client = {
connect = "127.0.0.1:90091",
- -- ssh user and password for git push
- user = "user"
- -- pass = "yyyy"
+ user = "user" -- remote ssh user
}
}
}
diff --git a/xmake/modules/private/service/remote_build/client.lua b/xmake/modules/private/service/remote_build/client.lua
index 19e739409..cb4373b17 100644
--- a/xmake/modules/private/service/remote_build/client.lua
+++ b/xmake/modules/private/service/remote_build/client.lua
@@ -267,14 +267,13 @@ end
-- do syncfiles, e.g. git push user@addr:remote_path branch:remote_branch
function remote_build_client:_do_syncfiles(remote_path, remote_branch)
local user = assert(config.get("remote_build.client.user"), "config(remote_build.client.user): not found!")
- local pass = config.get("remote_build.client.pass")
local addr = self:addr()
assert(remote_path, "git remote path not found!")
assert(remote_branch, "git remote branch not found!")
-- push to remote
local remote_url = string.format("%s@%s:%s", user, addr, remote_path)
- git.push(remote_url, {remote_branch = remote_branch, password = pass})
+ git.push(remote_url, {remote_branch = remote_branch})
end
function remote_build_client:__tostring()