[BACKEND] Set python __version__ as date, dynamically update it in make

This commit is contained in:
Jesse Bannon 2023-02-20 13:26:40 -08:00
parent 73094e79bb
commit 29a67ceeae
3 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,2 @@
# `make` overwrites with proper version
__version__ = "0000.00.00"

View file

@ -1,5 +1,6 @@
import sys
from ytdl_sub import __version__
from ytdl_sub.cli.main_args_parser import parser
from ytdl_sub.utils.exceptions import ValidationException
from ytdl_sub.utils.logger import Logger
@ -31,6 +32,7 @@ def main():
sys.exit(1)
except Exception: # pylint: disable=broad-except
logger.exception("An uncaught error occurred:")
logger.error("Version: %s", __version__)
logger.error(
"Please upload the error log file '%s' and make a Github "
"issue at https://github.com/jmbannon/ytdl-sub/issues with your config and "

View file

@ -1 +0,0 @@
__version__ = "0.2.0"