diff --git a/dkbuild b/dkbuild index f22be52..15aa279 100755 --- a/dkbuild +++ b/dkbuild @@ -1938,8 +1938,12 @@ function define_functions_cmd() { fi if [ -n "$autotag" ]; then if [ -n "$DIST" ]; then - [ -n "$HAVE_VERSION" -a "$VERSION" == "$LAST_VERSION" ] && imagetags+=("$imagetag:$DIST") - dist LATEST && imagetags+=("$imagetag:latest") + if [ -z "$HAVE_VERSION" ]; then + dist LATEST && imagetags+=("$imagetag:latest") + elif [ "$VERSION" == "$LAST_VERSION" ]; then + imagetags+=("$imagetag:$DIST") + dist LATEST && imagetags+=("$imagetag:latest") + fi elif [ -n "$PROFILE" ]; then profile DEFAULT && imagetags+=("$imagetag:latest") else