-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
62 lines (49 loc) · 1.2 KB
/
Makefile
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
SNAP_FILE = $(shell ls -1t *.snap | head -1)
LXD_NAME = $(shell lxc list --project snapcraft snapcraft-immich-distribution -cn -f csv)
all: build install
:
.PHONY: build
build:
snapcraft
.PHONY: try
try:
snapcraft try --debug --verbosity debug
sudo snap try prime
.PHONY: shell
shell:
lxc start --project snapcraft ${LXD_NAME} || :
lxc shell --project snapcraft ${LXD_NAME}
.PHONY: install
install:
sudo snap install --dangerous ${SNAP_FILE}
.PHONY: remove
remove:
sudo snap remove --purge immich-distribution
testprod:
cat ${SNAP_FILE} | ssh d -- lxc file push - immich-prod/root/${SNAP_FILE}
ssh d lxc exec immich-prod -- snap install --dangerous /root/${SNAP_FILE}
.PHONY: tests
tests:
make -C tests test
.PHONY: cleantests
cleantests:
sudo snap remove --purge immich-distribution
make install
make -C tests test
.PHONY: selenium
selenium:
make -C tests/ selenium
.PHONY: docs
docs:
cd docs && poetry run mkdocs serve
.PHONY: reset
reset:
@echo "This will purge and clean the local installation in 5 seconds ..."
sleep 5
make clean
sudo snap remove --purge immich-distribution
sudo rm -rf prime
.PHONY: clean
clean:
snapcraft clean || true
rm -rf SNAP_COMMON tests/latest_logs/ *.snap