mirror of
https://github.com/searxng/searxng
synced 2024-11-03 09:40:20 +00:00
parent
6d72ef3cbe
commit
0515f2974b
@ -59,7 +59,7 @@ def get_git_url_and_branch():
|
|||||||
|
|
||||||
|
|
||||||
def get_git_version():
|
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'")
|
||||||
tag_version = git_version = git_commit_date_hash
|
tag_version = git_version = git_commit_date_hash
|
||||||
|
|
||||||
# add "-dirty" suffix if there are uncommited changes except searx/settings.yml
|
# add "-dirty" suffix if there are uncommited changes except searx/settings.yml
|
||||||
@ -67,7 +67,7 @@ def get_git_version():
|
|||||||
subprocess_run("git diff --quiet -- . ':!searx/settings.yml' ':!utils/brand.env'")
|
subprocess_run("git diff --quiet -- . ':!searx/settings.yml' ':!utils/brand.env'")
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
if e.returncode == 1:
|
if e.returncode == 1:
|
||||||
git_version += "-dirty"
|
git_version += "+dirty"
|
||||||
else:
|
else:
|
||||||
logger.warning('"%s" returns an unexpected return code %i', e.returncode, e.cmd)
|
logger.warning('"%s" returns an unexpected return code %i', e.returncode, e.cmd)
|
||||||
return git_version, tag_version
|
return git_version, tag_version
|
||||||
|
Loading…
Reference in New Issue
Block a user