aimb-x/gitd
repositories / aimb-x / gitd

gitd public

git clone https://git.169.58.159.131.nip.io/aimb-x/gitd.git
Makefile 661 bytes 1 lines
1
.PHONY: test deploy serve users
2
3
test:
4
PYTHONPATH=. python3 -m unittest tests.test_gitd -v
5
6
serve:
7
GITD_DATA=$(PWD)/.data GITD_DB=$(PWD)/.data/gitd.kilat python3 -m gitd.httpd
8
9
# Pasang ke /opt + restart unit. Butuh root.
10
deploy:
11
rsync -a --delete --exclude __pycache__ gitd/ /opt/gitd/gitd/
12
install -m 644 README.md /opt/gitd/README.md
13
systemctl restart gitd
14
@sleep 1; curl -s localhost:8189/healthz; echo
15
16
# users FROM=/var/lib/agentgit/agentgit.kilat
17
users:
18
@test -n "$(FROM)" || (echo "butuh FROM=<kilat db>"; exit 2)
19
GITD_DATA=/var/lib/gitd GITD_DB=/var/lib/gitd/gitd.kilat python3 -m gitd.cli import-users $(FROM)
20
chown -R gitd:gitd /var/lib/gitd