set version dynamically
This commit is contained in:
parent
29a67ceeae
commit
0c61ef1377
4 changed files with 11 additions and 4 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -144,3 +144,6 @@ docker/root/*.whl
|
||||||
docker/root/defaults/examples
|
docker/root/defaults/examples
|
||||||
|
|
||||||
.local/
|
.local/
|
||||||
|
|
||||||
|
# Ignore updates to root __init__, will write new versions when running make
|
||||||
|
src/ytdl_sub/__init__.py
|
||||||
7
Makefile
7
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:
|
lint:
|
||||||
@-isort .
|
@-isort .
|
||||||
@-black .
|
@-black .
|
||||||
|
|
@ -10,13 +14,14 @@ check_lint:
|
||||||
&& pylint src/ \
|
&& pylint src/ \
|
||||||
&& pydocstyle src/*
|
&& pydocstyle src/*
|
||||||
wheel: clean
|
wheel: clean
|
||||||
|
$(shell echo "__version__ = \"$(VERSION)\"" > src/ytdl_sub/__init__.py)
|
||||||
pip3 install build
|
pip3 install build
|
||||||
python3 -m build
|
python3 -m build
|
||||||
docker_stage: wheel
|
docker_stage: wheel
|
||||||
cp dist/*.whl docker/root/
|
cp dist/*.whl docker/root/
|
||||||
cp -R examples docker/root/defaults/
|
cp -R examples docker/root/defaults/
|
||||||
docker: docker_stage
|
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:
|
docs:
|
||||||
sphinx-build -a -b html docs docs/_html
|
sphinx-build -a -b html docs docs/_html
|
||||||
clean:
|
clean:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = ytdl-sub
|
name = ytdl-sub
|
||||||
version = attr:ytdl_sub.version.__version__
|
version = attr:ytdl_sub.__version__
|
||||||
author = Jesse Bannon
|
author = Jesse Bannon
|
||||||
description = ytdl automated with metadata creation
|
description = ytdl automated with metadata creation
|
||||||
author_email = use_github_issues@nope.com
|
author_email = use_github_issues@nope.com
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
# `make` overwrites with proper version
|
__version__ = "2023.02.20+29a67ce"
|
||||||
__version__ = "0000.00.00"
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue