kdeploy 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/lib/kdeploy/executor.rb +16 -8
- data/lib/kdeploy/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83c00c00789f233f007546ca34305f421da37baf99cdbae2f025335f1be06c19
|
4
|
+
data.tar.gz: 6bf1d8e927c30f0e11d11aa14e1290ff8e7d224adb53a884fe621daf5776d7b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6827b3c353a608b1c554cb5ddd4c32909a938dd5125b9ab0175312b7a8b41b68830c578e11f6616ecb9fb884516a59eede85ecd8df321319334f49952d688761
|
7
|
+
data.tar.gz: fe23ae3d9b659ae1124dad9b8c5804c07884bdd463315f96aac4a988a29f9c86035c6f73fc74ae40846fbb3e747d597f89af9d79751dbbf5b4e7446835ed24fd
|
data/README.md
CHANGED
@@ -108,6 +108,11 @@ end
|
|
108
108
|
```bash
|
109
109
|
kdeploy execute deploy.rb
|
110
110
|
```
|
111
|
+
4. demo:
|
112
|
+
|
113
|
+
```bash
|
114
|
+
https://github.com/kevin197011/kdeploy-app
|
115
|
+
```
|
111
116
|
|
112
117
|
## 📖 Usage Guide
|
113
118
|
|
@@ -244,4 +249,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
244
249
|
|
245
250
|
## 🔍 Code of Conduct
|
246
251
|
|
247
|
-
Everyone interacting in the Kdeploy project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/kdeploy/blob/main/CODE_OF_CONDUCT.md).
|
252
|
+
Everyone interacting in the Kdeploy project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/kdeploy/blob/main/CODE_OF_CONDUCT.md).
|
data/lib/kdeploy/executor.rb
CHANGED
@@ -11,6 +11,7 @@ module Kdeploy
|
|
11
11
|
@ip = host_config[:ip]
|
12
12
|
@password = host_config[:password]
|
13
13
|
@key = host_config[:key]
|
14
|
+
@port = host_config[:port] # 新增端口支持
|
14
15
|
end
|
15
16
|
|
16
17
|
def execute(command)
|
@@ -18,15 +19,22 @@ module Kdeploy
|
|
18
19
|
stdout = String.new
|
19
20
|
stderr = String.new
|
20
21
|
|
21
|
-
ssh.
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
ssh.open_channel do |channel|
|
23
|
+
channel.exec(command) do |_ch, success|
|
24
|
+
raise "Could not execute command: #{command}" unless success
|
25
|
+
|
26
|
+
channel.on_data do |_ch, data|
|
27
|
+
print data # 实时输出
|
28
|
+
stdout << data
|
29
|
+
end
|
30
|
+
|
31
|
+
channel.on_extended_data do |_ch, _type, data|
|
32
|
+
print data # 实时输出
|
33
|
+
stderr << data
|
34
|
+
end
|
27
35
|
end
|
28
36
|
end
|
29
|
-
|
37
|
+
ssh.loop
|
30
38
|
{
|
31
39
|
stdout: stdout.strip,
|
32
40
|
stderr: stderr.strip,
|
@@ -66,7 +74,7 @@ module Kdeploy
|
|
66
74
|
elsif @key
|
67
75
|
options[:keys] = [@key]
|
68
76
|
end
|
69
|
-
|
77
|
+
options[:port] = @port if @port # 新增端口传递
|
70
78
|
options
|
71
79
|
end
|
72
80
|
end
|
data/lib/kdeploy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kdeploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Kk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|