Version eingebaut
This commit is contained in:
parent
0b79cc99ad
commit
98d9a84031
2 changed files with 16 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#V0.1.1b @MAC
|
||||
#V0.1.1b @PC
|
||||
import requests
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
|
@ -10,8 +10,17 @@ import random
|
|||
import shutil
|
||||
import logging
|
||||
from logging.handlers import RotatingFileHandler
|
||||
from version import VERSION
|
||||
|
||||
|
||||
def get_build():
|
||||
try:
|
||||
import subprocess
|
||||
return subprocess.check_output(
|
||||
["git", "rev-list", "--count", "HEAD"],
|
||||
stderr=subprocess.DEVNULL
|
||||
).decode().strip()
|
||||
except Exception:
|
||||
return "0"
|
||||
def setup_logging(app_dir, level=logging.INFO, console=True):
|
||||
logging.getLogger("httpx").setLevel(logging.WARNING)
|
||||
log_file = app_dir / "Simbriefimport.log"
|
||||
|
|
@ -467,7 +476,7 @@ ordnerneu.mkdir(exist_ok=True)
|
|||
logging.info("--------------------------------------------------")
|
||||
logging.info("START .txt Erzeugung ")
|
||||
logging.info("--------------------------------------------------")
|
||||
debug = False
|
||||
debug = True
|
||||
if debug == False:
|
||||
metarCabin = METAR()
|
||||
metar = metarCabin.choices[0].message.content
|
||||
|
|
@ -533,4 +542,6 @@ if debug == False:
|
|||
|
||||
logging.info("--------------------------------------------------")
|
||||
logging.info(" F E R T S C H ")
|
||||
logging.info("--------------------------------------------------")
|
||||
logging.info("--------------------------------------------------")
|
||||
|
||||
logging.info("Version: %s.%s", VERSION, get_build())
|
||||
|
|
|
|||
1
version.py
Normal file
1
version.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
VERSION = "0.1.1b"
|
||||
Loading…
Add table
Add a link
Reference in a new issue