From 407c8b834ec8c8e31dc24da88129597f643d069b Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Tue, 10 Dec 2024 15:57:30 -0800 Subject: [PATCH] Simplify hostname trimming. References #762. --- lib/kamal/cli/app/boot.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kamal/cli/app/boot.rb b/lib/kamal/cli/app/boot.rb index 41db39a6..8ddcaac3 100644 --- a/lib/kamal/cli/app/boot.rb +++ b/lib/kamal/cli/app/boot.rb @@ -45,7 +45,7 @@ def old_version_renamed_if_clashing def start_new_version audit "Booted app version #{version}" - hostname = "#{host.to_s[0...51].gsub(/\.+$/, '')}-#{SecureRandom.hex(6)}" + hostname = "#{host.to_s[0...51].chomp(".")}-#{SecureRandom.hex(6)}" execute *app.ensure_env_directory upload! role.secrets_io(host), role.secrets_path, mode: "0600"