kamal 2.2.1 → 2.2.2
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/lib/kamal/cli/proxy.rb +1 -1
- data/lib/kamal/commands/base.rb +10 -8
- data/lib/kamal/commands/builder/clone.rb +16 -14
- data/lib/kamal/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7da17dcbc307380fd036004d67e3007ea6824a4b634f161c2882776b5c2020df
|
4
|
+
data.tar.gz: c394f629044adecac7c2bc65a8ea6615269a010d68be8051c4fd4c579e5be686
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41028ff1893c92dfea1d1de5f5289e60fd719f28445f7f827b513482463e364e3640a88003ef68b24b4fcb4f502f88dbb3daf9c4e04d956fc8a03e09d4f64d90
|
7
|
+
data.tar.gz: b6db1eb9d4acbd57ce4fcce79798a2f1ad47cd043e2624c03ee940a86fc32bf49bf0446c70142e98e7d87e06cc5c6ee6dd89448533b5c2577fd2d6ee57faaa87
|
data/lib/kamal/cli/proxy.rb
CHANGED
@@ -21,7 +21,7 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
desc "boot_config <set|get|reset>", "
|
24
|
+
desc "boot_config <set|get|reset>", "Manage kamal-proxy boot configuration"
|
25
25
|
option :publish, type: :boolean, default: true, desc: "Publish the proxy ports on the host"
|
26
26
|
option :http_port, type: :numeric, default: Kamal::Configuration::PROXY_HTTP_PORT, desc: "HTTP port to publish on the host"
|
27
27
|
option :https_port, type: :numeric, default: Kamal::Configuration::PROXY_HTTPS_PORT, desc: "HTTPS port to publish on the host"
|
data/lib/kamal/commands/base.rb
CHANGED
@@ -11,14 +11,7 @@ module Kamal::Commands
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def run_over_ssh(*command, host:)
|
14
|
-
"ssh".
|
15
|
-
if config.ssh.proxy && config.ssh.proxy.is_a?(Net::SSH::Proxy::Jump)
|
16
|
-
cmd << " -J #{config.ssh.proxy.jump_proxies}"
|
17
|
-
elsif config.ssh.proxy && config.ssh.proxy.is_a?(Net::SSH::Proxy::Command)
|
18
|
-
cmd << " -o ProxyCommand='#{config.ssh.proxy.command_line_template}'"
|
19
|
-
end
|
20
|
-
cmd << " -t #{config.ssh.user}@#{host} -p #{config.ssh.port} '#{command.join(" ").gsub("'", "'\\\\''")}'"
|
21
|
-
end
|
14
|
+
"ssh#{ssh_proxy_args} -t #{config.ssh.user}@#{host} -p #{config.ssh.port} '#{command.join(" ").gsub("'", "'\\\\''")}'"
|
22
15
|
end
|
23
16
|
|
24
17
|
def container_id_for(container_name:, only_running: false)
|
@@ -92,5 +85,14 @@ module Kamal::Commands
|
|
92
85
|
def tags(**details)
|
93
86
|
Kamal::Tags.from_config(config, **details)
|
94
87
|
end
|
88
|
+
|
89
|
+
def ssh_proxy_args
|
90
|
+
case config.ssh.proxy
|
91
|
+
when Net::SSH::Proxy::Jump
|
92
|
+
" -J #{config.ssh.proxy.jump_proxies}"
|
93
|
+
when Net::SSH::Proxy::Command
|
94
|
+
" -o ProxyCommand='#{config.ssh.proxy.command_line_template}'"
|
95
|
+
end
|
96
|
+
end
|
95
97
|
end
|
96
98
|
end
|
@@ -1,29 +1,31 @@
|
|
1
1
|
module Kamal::Commands::Builder::Clone
|
2
|
-
extend ActiveSupport::Concern
|
3
|
-
|
4
|
-
included do
|
5
|
-
delegate :clone_directory, :build_directory, to: :"config.builder"
|
6
|
-
end
|
7
|
-
|
8
2
|
def clone
|
9
|
-
git :clone,
|
3
|
+
git :clone, escaped_root, "--recurse-submodules", path: config.builder.clone_directory.shellescape
|
10
4
|
end
|
11
5
|
|
12
6
|
def clone_reset_steps
|
13
7
|
[
|
14
|
-
git(:remote, "set-url", :origin,
|
15
|
-
git(:fetch, :origin, path:
|
16
|
-
git(:reset, "--hard", Kamal::Git.revision, path:
|
17
|
-
git(:clean, "-fdx", path:
|
18
|
-
git(:submodule, :update, "--init", path:
|
8
|
+
git(:remote, "set-url", :origin, escaped_root, path: escaped_build_directory),
|
9
|
+
git(:fetch, :origin, path: escaped_build_directory),
|
10
|
+
git(:reset, "--hard", Kamal::Git.revision, path: escaped_build_directory),
|
11
|
+
git(:clean, "-fdx", path: escaped_build_directory),
|
12
|
+
git(:submodule, :update, "--init", path: escaped_build_directory)
|
19
13
|
]
|
20
14
|
end
|
21
15
|
|
22
16
|
def clone_status
|
23
|
-
git :status, "--porcelain", path:
|
17
|
+
git :status, "--porcelain", path: escaped_build_directory
|
24
18
|
end
|
25
19
|
|
26
20
|
def clone_revision
|
27
|
-
git :"rev-parse", :HEAD, path:
|
21
|
+
git :"rev-parse", :HEAD, path: escaped_build_directory
|
22
|
+
end
|
23
|
+
|
24
|
+
def escaped_root
|
25
|
+
Kamal::Git.root.shellescape
|
26
|
+
end
|
27
|
+
|
28
|
+
def escaped_build_directory
|
29
|
+
config.builder.build_directory.shellescape
|
28
30
|
end
|
29
31
|
end
|
data/lib/kamal/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kamal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|