-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
78 lines (67 loc) · 1.92 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
77
78
# Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2022, 2023, 2024 Tom Most <twm@freecog.net>; GPLv3+
set shell := ["bash", "-euc"]
default:
just --list
_static:
tox -e static
# Tag a release and trigger the GHA release workflow
release:
#!/bin/bash
set -exu -o pipefail
if [[ $(git rev-parse --abbrev-ref HEAD) != trunk ]]
then
echo "ERROR: Must be on trunk branch"
exit 1
fi
if ! git diff --quiet HEAD
then
echo "ERROR: Dirty working copy"
exit 1
fi
tox -e release --notest --recreate
version=$(.tox/release/bin/hatch version)
tag="v${version}"
git tag "$tag"
git push origin "$tag"
git push origin trunk
iterstatic:
#!/bin/bash
tox -e static --notest
exec watchexec \
--watch css \
--watch img \
--watch vendor \
--watch bin \
--on-busy-update=queue \
--shell=none \
-- \
.tox/static/bin/python bin/compile-static.py --no-compress
itertests +args='yarrharr':
#!/bin/bash
tox -e test --develop --notest
export YARRHARR_CONF=./yarrharr/tests/dev.ini
export YARRHARR_TESTING=yes
export DJANGO_SETTINGS_MODULE=yarrharr.settings
export PYTHONDONTWRITEBYTECODE=yes
exec watchexec \
--watch yarrharr \
--on-busy-update=queue \
--shell=none \
-- \
.tox/test/bin/pytest -vvv ./yarrharr "$@"
devserver: _static
tox -e run -- django-admin migrate
tox -e run -- django-admin updatehtml
YARRHARR_CONF='yarrharr/tests/*.ini' tox -e run -- django-admin runserver 127.0.0.1:8888
realserver: _static
tox -e run -- django-admin migrate
tox -e run -- django-admin collectstatic --noinput
tox -e run -- yarrharr
poll-feeds:
tox -e run -- django-admin pollfeeds
force-poll:
tox -e run -- django-admin forcepoll
clean:
-rm -rf yarrharr/static
-rm -rf .tox
-find -name '*.pyc' -delete