aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: e42fc771c4577fdf180b24ea3c508b35f30dfadd (plain)
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
.PHONY: all clean docker-build run

all: build

build: fetch-dependencies
	kodev build

clean:
	kodev clean
	rm -rf lib

docker-build:
	DOCKER_BUILDKIT=1 docker build -t clog .

docker-clean:
	docker rm -f clog
	docker rm -f clog-postgres
	docker rmi -f clog:latest

docker-run:
	docker rm -f clog
	docker run --name clog -p 8888:8888 -d clog:latest

fetch-dependencies:
	mkdir -p lib
	# md4c
	test ! -f lib/md4c-0.5.1.tar.gz && curl -L https://github.com/mity/md4c/archive/refs/tags/release-0.5.1.tar.gz -o lib/md4c-0.5.1.tar.gz || true
	echo "2dca17c6175a7f11182943079c2a4f9adb5071433e3d3d05ba801ff794993f34  lib/md4c-0.5.1.tar.gz" > lib/md4c-0.5.1.tar.gz.sha256
	sha256sum -c lib/md4c-0.5.1.tar.gz.sha256
	tar xf lib/md4c-0.5.1.tar.gz -C lib
	rm -rf lib/md4c
	mv lib/md4c-release-0.5.1 lib/md4c

run:
	kodev run