[mod] py: don't append "-dirty" to DOCKER_TAG (#5021)

We don't expect tags to have "-dirty", just the GIT_VERSION regardless of how the container is built.
This commit is contained in:
Ivan Gabaldon 2025-07-18 10:42:44 +02:00 committed by GitHub
parent 22c6cd4121
commit ff2e0ea278
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,6 +69,7 @@ def get_git_version():
# which depended on the git version: '2023.05.06+..' --> '2023.5.6+..'
git_commit_date_hash = git_commit_date_hash.replace('.0', '.')
tag_version = git_version = git_commit_date_hash
docker_tag = git_commit_date_hash.replace("+", "-")
# add "+dirty" suffix if there are uncommitted changes except searx/settings.yml
try:
@ -78,7 +79,7 @@ def get_git_version():
git_version += "+dirty"
else:
logger.warning('"%s" returns an unexpected return code %i', e.returncode, e.cmd)
docker_tag = git_version.replace("+", "-")
return git_version, tag_version, docker_tag