print current version on startup (#58)
This commit is contained in:
parent
4dc41ee02c
commit
213ef57abe
2 changed files with 15 additions and 2 deletions
|
@ -12,6 +12,7 @@ import requests
|
||||||
import time
|
import time
|
||||||
import argparse
|
import argparse
|
||||||
import uuid
|
import uuid
|
||||||
|
import git
|
||||||
|
|
||||||
argparser=argparse.ArgumentParser()
|
argparser=argparse.ArgumentParser()
|
||||||
|
|
||||||
|
@ -895,7 +896,16 @@ class OrderedSet:
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
start = datetime.now()
|
start = datetime.now()
|
||||||
|
|
||||||
log(f"Starting FediFetcher")
|
repo = git.Repo(os.getcwd())
|
||||||
|
|
||||||
|
tag = next((tag for tag in repo.tags if tag.commit == repo.head.commit), None)
|
||||||
|
|
||||||
|
if(isinstance(tag, git.TagReference)) :
|
||||||
|
version = tag.name
|
||||||
|
else:
|
||||||
|
version = f"on commit {repo.head.commit.name_rev}"
|
||||||
|
|
||||||
|
log(f"Starting FediFetcher {version}")
|
||||||
|
|
||||||
arguments = argparser.parse_args()
|
arguments = argparser.parse_args()
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
certifi==2022.12.7
|
certifi==2022.12.7
|
||||||
charset-normalizer==3.0.1
|
charset-normalizer==3.0.1
|
||||||
docutils==0.19
|
docutils==0.19
|
||||||
|
gitdb==4.0.10
|
||||||
|
GitPython==3.1.31
|
||||||
idna==3.4
|
idna==3.4
|
||||||
|
python-dateutil==2.8.2
|
||||||
requests==2.28.2
|
requests==2.28.2
|
||||||
six==1.16.0
|
six==1.16.0
|
||||||
|
smmap==5.0.0
|
||||||
urllib3==1.26.14
|
urllib3==1.26.14
|
||||||
python-dateutil==2.8.2
|
|
Loading…
Reference in a new issue