diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2022-06-04 09:04:15 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2022-06-04 09:15:26 +0200 |
commit | 0c489a25ac367d261e9d701be2615783d06b2015 (patch) | |
tree | 6a99edbe11bf192fed675fda4c32deb1b4d27f8a /searx/version.py | |
parent | c17c7dc0504daa6be675de6ac08fed03ef3246f7 (diff) | |
download | searxng-0c489a25ac367d261e9d701be2615783d06b2015.tar.gz searxng-0c489a25ac367d261e9d701be2615783d06b2015.zip |
[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>
Diffstat (limited to 'searx/version.py')
-rw-r--r-- | searx/version.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/version.py b/searx/version.py index 678dab4b2..ec72062e6 100644 --- a/searx/version.py +++ b/searx/version.py @@ -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 |