Use latest tag for the current destination
This commit is contained in:
@@ -284,6 +284,6 @@ class Kamal::Cli::App < Kamal::Cli::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def version_or_latest
|
def version_or_latest
|
||||||
options[:version] || "latest"
|
options[:version] || KAMAL.config.latest_tag
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class Kamal::Commands::App < Kamal::Commands::Base
|
|||||||
|
|
||||||
def current_running_container_id
|
def current_running_container_id
|
||||||
pipe \
|
pipe \
|
||||||
[ shell(chain(latest_image_container_id, latest_container_id)) ],
|
shell(chain(latest_image_container_id, latest_container_id)),
|
||||||
[ :head, "-1" ]
|
[ :head, "-1" ]
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ class Kamal::Commands::App < Kamal::Commands::Base
|
|||||||
|
|
||||||
def current_running_version
|
def current_running_version
|
||||||
pipe \
|
pipe \
|
||||||
[ shell(chain(latest_image_container_name, latest_container_name)) ],
|
shell(chain(latest_image_container_name, latest_container_name)),
|
||||||
[ :head, "-1" ],
|
[ :head, "-1" ],
|
||||||
extract_version_from_name
|
extract_version_from_name
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -128,7 +128,11 @@ class Kamal::Configuration
|
|||||||
end
|
end
|
||||||
|
|
||||||
def latest_image
|
def latest_image
|
||||||
"#{repository}:#{[ "latest", *destination ].join("-")}"
|
"#{repository}:#{latest_tag}"
|
||||||
|
end
|
||||||
|
|
||||||
|
def latest_tag
|
||||||
|
[ "latest", *destination ].join("-")
|
||||||
end
|
end
|
||||||
|
|
||||||
def service_with_version
|
def service_with_version
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: docker/deployer
|
context: docker/deployer
|
||||||
environment:
|
environment:
|
||||||
- TEST_ID=${TEST_ID}
|
- TEST_ID=${TEST_ID:-}
|
||||||
volumes:
|
volumes:
|
||||||
- ../..:/kamal
|
- ../..:/kamal
|
||||||
- shared:/shared
|
- shared:/shared
|
||||||
|
|||||||
Reference in New Issue
Block a user