Skip to content

Commit e95b502

Browse files
committed
make -> just
1 parent 6f1b1bb commit e95b502

File tree

2 files changed

+31
-33
lines changed

2 files changed

+31
-33
lines changed

Makefile

Lines changed: 0 additions & 33 deletions
This file was deleted.

justfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version := `python3 -c "from configparser import ConfigParser; p = ConfigParser(); p.read('setup.cfg'); print(p['metadata']['version'])"`
2+
name := `python3 -c "from configparser import ConfigParser; p = ConfigParser(); p.read('setup.cfg'); print(p['metadata']['name'])"`
3+
4+
5+
default:
6+
@echo "\"just publish\"?"
7+
8+
tag:
9+
@if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
10+
curl -H "Authorization: token `cat ~/.github-access-token`" -d '{"tag_name": "{{version}}"}' https://api.github.com/repos/nschloe/{{name}}/releases
11+
12+
upload: clean
13+
@if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
14+
# https://stackoverflow.com/a/58756491/353337
15+
python3 -m build --sdist --wheel .
16+
twine upload dist/*
17+
18+
publish: tag upload
19+
20+
clean:
21+
@find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
22+
@rm -rf src/*.egg-info/ build/ dist/ .tox/
23+
24+
format:
25+
isort .
26+
black .
27+
blacken-docs README.md
28+
29+
lint:
30+
black --check .
31+
flake8 .

0 commit comments

Comments
 (0)