Make building from a git archive the default
If no context is specified and we are in a git repo, then we'll build from a git archive by default. This means we don't need a separate setting and gives us a safer default build.
This commit is contained in:
@@ -86,7 +86,7 @@ class Kamal::Configuration::Builder
|
||||
end
|
||||
|
||||
def git_archive?
|
||||
@options["git_archive"]
|
||||
Kamal::Git.used? && @options["context"].nil?
|
||||
end
|
||||
|
||||
private
|
||||
@@ -94,9 +94,6 @@ class Kamal::Configuration::Builder
|
||||
if @options["cache"] && @options["cache"]["type"]
|
||||
raise ArgumentError, "Invalid cache type: #{@options["cache"]["type"]}" unless [ "gha", "registry" ].include?(@options["cache"]["type"])
|
||||
end
|
||||
if @options["context"] && @options["git_archive"]
|
||||
raise ArgumentError, "Cannot set a builder context when building from a git archive"
|
||||
end
|
||||
end
|
||||
|
||||
def cache_image
|
||||
|
||||
Reference in New Issue
Block a user