From b91d3103578f0e812f1ab05ae9beb2e889cac8f1 Mon Sep 17 00:00:00 2001 From: tranch Date: Tue, 28 Jul 2026 02:08:21 +0800 Subject: fix: avoid duplicate date in image version label --- Justfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Justfile b/Justfile index af61316..8161c52 100644 --- a/Justfile +++ b/Justfile @@ -110,8 +110,8 @@ sudoif command *args: # $target_image - The tag you want to apply to the image (default: $image_name). # $tag - The tag for the image (default: $default_tag). # -# The script constructs the version string using the tag and the current date. -# If the git working directory is clean, it also includes the short SHA of the current HEAD. +# If the git working directory is clean, it appends the short SHA of the current HEAD +# to the version tag supplied by the build environment. # # just build $target_image $tag # @@ -141,7 +141,7 @@ build $target_image=image_name $tag=default_tag: LABELS+=("--label" "org.opencontainers.image.documentation=https://raw.githubusercontent.com/{{ repo_organization }}/{{ image_name }}/${GIT_SHA}/README.md") LABELS+=("--label" "org.opencontainers.image.source=https://github.com/{{ repo_organization }}/{{ image_name }}/blob/${GIT_SHA}/Containerfile") LABELS+=("--label" "org.opencontainers.image.url=https://github.com/{{ repo_organization }}/{{ image_name }}/tree/${GIT_SHA}") - LABELS+=("--label" "org.opencontainers.image.version={{ VERSION_TAG }}.$(date +%Y%m%d)-${GIT_SHA}") + LABELS+=("--label" "org.opencontainers.image.version={{ VERSION_TAG }}-${GIT_SHA}") fi # Image metadata for https://artifacthub.io/ - This is optional but is highly recommended so we all can get a index of all the custom images -- cgit v1.2.3