-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 964 Bytes
/
Makefile
File metadata and controls
40 lines (30 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.PHONY: all lint test clean bump upload version push docker-build
all: lint test
SHELL := /bin/bash
CWD := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
version := $(shell grep '^Version:' PKG-INFO | sed 's/Version: //')
next := $(shell echo ${version} | awk -F. '/[0-9]+\./{$$NF++;print}' OFS=.)
lint:
black -v lidarr_youtube_downloader/*.py
black -v setup.py
flake8 --max-line-length 120 setup.py lidarr_youtube_downloader/*.py || true
test:
pytest -v
clean:
rm -rvf dist build *.egg-info
bump: clean
sed "s/$(version)/$(next)/" -i PKG-INFO
sed "s/$(version)/$(next)/" -i pyproject.toml
sed "s/$(version)/$(next)/" -i setup.py
upload: bump
python3 -m pip install --upgrade build
python3 -m pip install --upgrade twine
python3 -m build
python3 -m twine upload --repository pypi dist/*
version: upload clean
git add -A
git commit -a -m "Bump to $(next)"
docker-build:
docker build -t lyd .
push:
git push -u origin main:main