-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (31 loc) · 984 Bytes
/
Makefile
File metadata and controls
42 lines (31 loc) · 984 Bytes
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
.PHONY: clean debug deploy image manifest push pypi tidy
SITE = backend/ldap_ui/statics
VERSION = $(shell fgrep __version__ backend/ldap_ui/__init__.py | cut -d'"' -f2)
IMAGE = dnknth/ldap-ui
debug: $(SITE) .env
DEBUG=true uv run ldap-ui --reload --port 5000
.env: env.demo
cp $< $@
dist: clean $(SITE)
uv build
pypi: dist
uv publish --token `pass token/pypi.org` dist/*
deploy: clean $(SITE)
rsync -a --delete $(SITE)/ mx:/opt/ldap-ui/venv/lib/python3.12/site-packages/ldap_ui/statics/
$(SITE): node_modules
pnpm audit
pnpm run build
node_modules: package.json
pnpm install
touch $@
clean:
rm -rf build dist $(SITE) backend/ldap_ui.egg-info
-find backend -name __pycache__ -exec rm -rf {} \;
tidy: clean
rm -rf .venv node_modules
# See: https://docs.docker.com/build/building/multi-platform/#multiple-native-nodes
push:
docker buildx build --push \
--platform linux/amd64,linux/arm64 \
-t $(IMAGE):$(VERSION) -t $(IMAGE):latest .
docker pushrm $(IMAGE)