mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 19:01:00 +00:00
[fix] version.py: git format '%cs' is not downward compatible
Committer date, short format YYYY-MM-DD ('%cs') [1] is not supported by older git versions. Instead use '%cd' committer date (format respects --date= option) [2]. [1] https://www.git-scm.com/docs/git-show#Documentation/git-show.txt-emcsem [2] https://www.git-scm.com/docs/git-show#Documentation/git-show.txt-emcdem Suggested-by: @ravermeister https://github.com/searxng/searxng/issues/1251#issuecomment-1146282429 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
c17c7dc050
commit
0c489a25ac
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ def get_git_url_and_branch():
|
|||
|
||||
|
||||
def get_git_version():
|
||||
git_commit_date_hash = subprocess_run(r"git show -s --format='%cs-%h'").replace("-", ".", 2)
|
||||
git_commit_date_hash = subprocess_run(r"git show -s --date='format:%Y.%m.%d' --format='%cd-%h'")
|
||||
tag_version = git_version = git_commit_date_hash
|
||||
|
||||
# add "-dirty" suffix if there are uncommited changes except searx/settings.yml
|
||||
|
|
Loading…
Reference in a new issue