-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
44 lines (34 loc) · 976 Bytes
/
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
set dotenv-load := true
# List all available commands
_default:
@just --list --unsorted
@setup:
hatch env create
hatch run pre-commit install
@install:
hatch run python -- --version
@test:
hatch run pytest
@fmt:
hatch fmt --formatter
just --fmt --unstable
hatch run pre-commit run reorder-python-imports -a
@dj *ARGS:
cd demo && hatch run python manage.py {{ ARGS }}
@run-demo:
cd demo && hatch run python manage.py runserver
# Bump project version and update changelog
bumpver VERSION:
#!/usr/bin/env sh
hatch run bump-my-version bump {{ VERSION }}
hatch run git-cliff --output CHANGELOG.md
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit."
git push && git push --tags
exit 0
fi
version="$(hatch version)"
git add CHANGELOG.md
git commit -m "Generate changelog for version ${version}"
git tag -f "v${version}"
git push && git push --tags