From a541a7ee856db94731f89e7a6cf0f8f57a86c1b4 Mon Sep 17 00:00:00 2001 From: Michael Bridgen Date: Tue, 9 Feb 2021 21:13:30 +0000 Subject: [PATCH] Remove suggestions of using commit number Using a commit number is trickier than it sounds. It would need to be padded to sort correctly, for one thing. It is better to leave it out than to give an incomplete account. Signed-off-by: Michael Bridgen --- docs/guides/sortable-image-tags.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/docs/guides/sortable-image-tags.md b/docs/guides/sortable-image-tags.md index 72bcb2f6..5d5a3554 100644 --- a/docs/guides/sortable-image-tags.md +++ b/docs/guides/sortable-image-tags.md @@ -30,17 +30,6 @@ Alternatively, you can use a stable serial number as part of the tag. Some CI p provide a build number in an environment variable, but that may not be reliable to use as a serial number -- check the platform documentation. -A commit count can be a reasonable stand-in for a serial number, if you build an image per commit, -and you don't rewrite the branch in question. - -```bash -$ # commits in branch -$ git --rev-list --count HEAD -1504 -``` - -Beware: this will not give a useful number if you have a shallow clone. - ### Other things to include in the image tag It is also handy to quickly trace an image to the branch and commit of its source code. Including