diff --git a/.gitignore b/.gitignore index 41f140cf..4f464d0c 100644 --- a/.gitignore +++ b/.gitignore @@ -144,3 +144,6 @@ docker/root/*.whl docker/root/defaults/examples .local/ + +# Ignore updates to root __init__, will write new versions when running make +src/ytdl_sub/__init__.py \ No newline at end of file diff --git a/Makefile b/Makefile index 12bced16..eb599acf 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,8 @@ +export DATE=$(shell date +'%Y.%m.%d') +export REV=$(shell git rev-parse --short HEAD) +export VERSION="$(DATE)+$(REV)" + lint: @-isort . @-black . @@ -10,13 +14,14 @@ check_lint: && pylint src/ \ && pydocstyle src/* wheel: clean + $(shell echo "__version__ = \"$(VERSION)\"" > src/ytdl_sub/__init__.py) pip3 install build python3 -m build docker_stage: wheel cp dist/*.whl docker/root/ cp -R examples docker/root/defaults/ docker: docker_stage - sudo docker build --no-cache -t ytdl-sub:0.1 docker/ + sudo docker build --no-cache -t ytdl-sub:local docker/ docs: sphinx-build -a -b html docs docs/_html clean: diff --git a/setup.cfg b/setup.cfg index 66f6ecd9..658fcd12 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = ytdl-sub -version = attr:ytdl_sub.version.__version__ +version = attr:ytdl_sub.__version__ author = Jesse Bannon description = ytdl automated with metadata creation author_email = use_github_issues@nope.com diff --git a/src/ytdl_sub/__init__.py b/src/ytdl_sub/__init__.py index 1d86f26b..1a1aa9b8 100644 --- a/src/ytdl_sub/__init__.py +++ b/src/ytdl_sub/__init__.py @@ -1,2 +1 @@ -# `make` overwrites with proper version -__version__ = "0000.00.00" +__version__ = "2023.02.20+29a67ce"