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:
@@ -103,17 +103,17 @@ class ConfigurationTest < ActiveSupport::TestCase
|
||||
|
||||
Kamal::Git.expects(:revision).returns("git-version")
|
||||
Kamal::Git.expects(:uncommitted_changes).returns("M file\n")
|
||||
assert_match /^git-version_uncommitted_[0-9a-f]{16}$/, @config.version
|
||||
assert_equal "git-version", @config.version
|
||||
end
|
||||
|
||||
test "version from git archive uncommitted" do
|
||||
test "version from uncommitted context" do
|
||||
ENV.delete("VERSION")
|
||||
|
||||
config = Kamal::Configuration.new(@deploy.tap { |c| c[:builder] = { "git_archive" => true } })
|
||||
config = Kamal::Configuration.new(@deploy.tap { |c| c[:builder] = { "context" => "." } })
|
||||
|
||||
Kamal::Git.expects(:revision).returns("git-version")
|
||||
Kamal::Git.expects(:uncommitted_changes).returns("M file\n")
|
||||
assert_equal "git-version", config.version
|
||||
assert_match /^git-version_uncommitted_[0-9a-f]{16}$/, config.version
|
||||
end
|
||||
|
||||
test "version from env" do
|
||||
|
||||
Reference in New Issue
Block a user