This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
forked from m13253/danmaku2ass
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjustfile
76 lines (60 loc) · 1.58 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
VERSION := `poetry run python -c "import sys; from biliass import __version__ as version; sys.stdout.write(version)"`
install:
poetry install
test:
just gen-test-files
poetry run pytest
just clean
fmt:
poetry run ruff format .
fmt-docs:
prettier --write '**/*.md'
lint:
poetry run ruff check .
build:
touch biliass/py.typed
poetry build
release:
@echo 'Tagging v{{VERSION}}...'
git tag "v{{VERSION}}"
@echo 'Push to GitHub to trigger publish process...'
git push --tags
publish:
touch biliass/py.typed
poetry publish --build
git tag "v{{VERSION}}"
git push --tags
just clean-builds
clean:
find . -name "*.xml" -print0 | xargs -0 rm -f
find . -name "*.ass" -print0 | xargs -0 rm -f
find . -name "*.pb" -print0 | xargs -0 rm -f
find . -name "*.m4s" -print0 | xargs -0 rm -f
find . -name "*.mp4" -print0 | xargs -0 rm -f
find . -name "*.aac" -print0 | xargs -0 rm -f
find . -name "*.xml" -print0 | xargs -0 rm -f
find . -name "*.srt" -print0 | xargs -0 rm -f
find . -name "*.ass" -print0 | xargs -0 rm -f
rm -rf .pytest_cache
clean-builds:
rm biliass/py.typed
rm -rf biliass/biliass.pyi
rm -rf .mypy_cache/
rm -rf **/__pycache__
rm -rf biliass.egg-info/
rm -rf build/
rm -rf dist/
ci-install:
poetry install --no-interaction --no-root
ci-fmt-check:
poetry run ruff format --check --diff .
ci-lint:
just lint
ci-test:
just gen-test-files
poetry run pytest --reruns 3 --reruns-delay 1
just clean
compile-protobuf:
protoc --python_out=biliass protobuf/danmaku.proto
gen-test-files:
poetry run python scripts/gen_test_files.py