forked from jcollie/octodns-netbox-dns
-
Notifications
You must be signed in to change notification settings - Fork 4
/
justfile
83 lines (62 loc) · 1.78 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
79
80
81
82
83
#!/usr/bin/env just --justfile
default: show_receipts
set shell := ["bash", "-uc"]
set dotenv-load
show_receipts:
just --list
show_system_info:
@echo "=================================="
@echo "os : {{os()}}"
@echo "arch: {{arch()}}"
@echo "justfile dir: {{justfile_directory()}}"
@echo "invocation dir: {{invocation_directory()}}"
@echo "running dir: `pwd -P`"
@echo "=================================="
setup:
asdf install
create_venv:
@echo "creating venv"
python3 -m pip install --upgrade pip setuptools wheel
python3 -m venv venv
install_deps:
@echo "installing dependencies"
python3 -m hatch dep show requirements --project-only > /tmp/requirements.txt
pip3 install -r /tmp/requirements.txt
install_deps_dev:
@echo "installing dev dependencies"
python3 -m hatch dep show requirements --project-only > /tmp/requirements.txt
python3 -m hatch dep show requirements --env-only >> /tmp/requirements.txt
pip3 install -r /tmp/requirements.txt
create_reqs:
@echo "creating requirements"
pipreqs --force --savepath requirements.txt src/octodns_netbox_dns
lint:
just show_system_info
hatch run lint:style
hatch run lint:typing
format *args:
just show_system_info
hatch run lint:fmt {{ args }}
check:
just lint
just format
build:
hatch build --clean
test:
hatch run default:test
up:
docker compose -f dev/compose.yml up
down:
docker compose -f dev/compose.yml down
clean:
rm -rf dev/db-data/*
rm -rf dev/redis-data/*
rm -rf dev/netbox-data/*
sync *args:
hatch -v run default:sync {{ args }}
dump *args:
hatch -v run default:dump {{ args }}
dump2 *args:
hatch -v run default:dump2 {{ args }}
validate *args:
hatch -v run default:validate {{ args }}