-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
58 lines (46 loc) · 1.26 KB
/
justfile
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Get help
help:
just -l
## Package repository as tar for easy distribution
tar-source: package-deps
rm -rf tar-src/
mkdir tar-src/
git-archive-all --prefix simple-sign/ tar-src/simple_sign-v0.0.0.tar.gz
## Upgrade dependencies for packaging
package-deps:
python3 -m pip install -U twine wheel build git-archive-all
## Package the source code
package-source: package-deps clean
python -m build .
## Check the distribution is valid
package-check: clean package-source
twine check dist/*
## Upload package to test.pypi
package-upload-test: clean package-deps package-check
twine upload dist/* --repository-url https://test.pypi.org/legacy/ --verbose
## Upload package to pypi
package-upload: clean package-deps package-check
twine upload dist/* --repository-url https://upload.pypi.org/legacy/ --verbose
# Package
package: package-upload
## Run pre-commit-checks.
pre-commit-checks:
pre-commit run --all-files
## Upgrade project dependencies
upgrade:
pip-upgrade
## Generate documentation
docs:
rm -r docs/*
pdoc3 --force --html -o docs src/
mv docs/src/* docs/.
rm -r docs/src
## Serve the documentation
serve-docs:
python3 -m http.server --directory docs/
## Clean the package directory
clean:
rm -rf src/*.egg-info/
rm -rf build/
rm -rf dist/
rm -rf tar-src/