Skip to content

Commit

Permalink
refac: add short commit to tag
Browse files Browse the repository at this point in the history
This commit adds the short commit after the timestamp.
Will help to know which commit the image version will be coming from.

Signed-off-by: Antony Reynaud <[email protected]>
  • Loading branch information
Artyop committed Jul 31, 2024
1 parent 63ec437 commit b7872f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/make-image-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ if [ "$#" -eq 1 ] ; then
echo "${image_dir} is not a directory (path is relative to git root)"
exit 1
fi
image_tag="$(git log -1 --pretty=format:"%ct" "${image_dir}")"
timestamp="$(git log -1 --pretty=format:"%ct" "${image_dir}")"
short_commit="$(git log -1 --pretty=format:"%h" "${image_dir}")"
image_tag="${timestamp}-${short_commit}"
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 b7872f1

Please sign in to comment.