Move kamal deploy config to the gem

This commit is contained in:
Jorge Manrubia
2025-11-23 05:45:58 +01:00
committed by Jorge Manrubia
parent 35b49a417d
commit 2c7079393a
6 changed files with 28 additions and 0 deletions
+16
View File
@@ -22,6 +22,22 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
end
require "rubygems"
require_relative "../lib/fizzy"
if Fizzy.saas?
ENV["BUNDLE_WITH"] = [ ENV["BUNDLE_WITH"], "saas" ].compact.join(",")
end
require "bundler/setup"
if Fizzy.saas?
gem_path = Gem::Specification.find_by_name("fizzy-saas").gem_dir
deploy_config = File.join(gem_path, "config", "deploy.yml")
# Add -c option to ARGV if not already present
unless ARGV.include?("-c") || ARGV.include?("--config-file")
ARGV.unshift("-c", deploy_config)
end
end
load Gem.bin_path("kamal", "kamal")