1
0
mirror of https://github.com/searxng/searxng.git synced 2024-10-04 02:20:13 +02:00

Merge pull request #2416 from return42/fix-2413

[fix] version format string generated by 'git show'
This commit is contained in:
Markus Heiser 2023-05-10 18:42:22 +02:00 committed by GitHub
commit cb1c3741d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,10 @@ def get_git_url_and_branch():
def get_git_version():
git_commit_date_hash = subprocess_run(r"git show -s --date='format:%-Y.%-m.%-d' --format='%cd+%h'")
git_commit_date_hash = subprocess_run(r"git show -s --date='format:%Y.%m.%d' --format='%cd+%h'")
# Remove leading zero from minor and patch level / replacement of PR-2122
# 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
# add "+dirty" suffix if there are uncommited changes except searx/settings.yml