File tree Expand file tree Collapse file tree 2 files changed +31
-33
lines changed Expand file tree Collapse file tree 2 files changed +31
-33
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
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 .
You can’t perform that action at this time.
0 commit comments