Skip to content

Commit

Permalink
Use latest directory commit timestamp as tag
Browse files Browse the repository at this point in the history
This commit change the way of tagging image, from using git-lfs-tree sha256 to using directory's last commit timestamp.
It will permit renovate to sort versions and update properly new images, where renovate wasn't able to do so before due to its inability to sort SHAs.

Signed-off-by: Antony Reynaud <[email protected]>
  • Loading branch information
Artyop committed Jul 12, 2024
1 parent 8f8cd0b commit 38d4a0a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions scripts/make-image-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ if [ "$#" -eq 1 ] ; then
echo "${image_dir} is not a directory (path is relative to git root)"
exit 1
fi
git_ls_tree="$(git ls-tree --full-tree HEAD -- "${image_dir}")"
if [ -z "${git_ls_tree}" ] ; then
echo "${image_dir} exists, but it is not checked in git (path is relative to git root)"
exit 1
fi
image_tag="$(printf "%s" "${git_ls_tree}" | sed 's/^[0-7]\{6\} tree \([0-9a-f]\{40\}\).*/\1/')"
image_tag="$(git log -1 --pretty=format:"%ct" "${image_dir}")"
else
# if no arguments are given, attempt detecting if version tag is present,
# otherwise use the a short commit hash
Expand Down

0 comments on commit 38d4a0a

Please sign in to comment.