-
Notifications
You must be signed in to change notification settings - Fork 22
/
Makefile
98 lines (71 loc) · 2.6 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
all: build-manager build-worker build-worker-util
check-all: check-manager check-worker check-worker-util check-git
check: check-manager check-worker check-worker-util
fix: fix-manager fix-worker fix-worker-util
test: test-manager test-worker test-worker-util
check-manager:
$(MAKE) -C ./damocles-manager/ check
check-worker:
$(MAKE) -C ./damocles-worker/ check
check-worker-util:
$(MAKE) -C ./damocles-worker-util/ check
fix-manager:
$(MAKE) -C ./damocles-manager/ fix
fix-worker:
$(MAKE) -C ./damocles-worker/ fix
fix-worker-util:
$(MAKE) -C ./damocles-worker-util/ fix
test-manager:
$(MAKE) -C ./damocles-manager/ test-all
test-worker:
$(MAKE) -C ./damocles-worker/ test-all
test-worker-util:
$(MAKE) -C ./damocles-worker-util/ test-all
build: build-manager build-worker build-worker-util
build-manager:
mkdir -p ./dist/bin/
rm -rf ./dist/bin/damocles-manager
$(MAKE) -C ./damocles-manager/ build-all
mv ./damocles-manager/damocles-manager ./dist/bin/
# mv ./damocles-manager/plugin-fsstore.so ./dist/bin/
# mv ./damocles-manager/plugin-memdb.so ./dist/bin/
build-worker:
mkdir -p ./dist/bin/
rm -rf ./dist/bin/damocles-worker
$(MAKE) -C ./damocles-worker/ build-all
cp $(shell cargo metadata --format-version=1 --manifest-path=./damocles-worker/Cargo.toml | jq -r ".target_directory")/release/damocles-worker ./dist/bin/
build-worker-util:
mkdir -p ./dist/bin/
rm -rf ./dist/bin/damocles-worker-util
$(MAKE) -C ./damocles-worker-util/ build-all
cp $(shell cargo metadata --format-version=1 --manifest-path=./damocles-worker-util/Cargo.toml | jq -r ".target_directory")/release/damocles-worker-util ./dist/bin/
check-git:
./scripts/check-git-dirty.sh
clean:
$(MAKE) -C ./damocles-manager/ clean
dist-clean:
git clean -xdff
git submodule deinit --all -f
.PHONY: dist-clean
dev-env:
ln -s ../../.githooks/pre-push ./.git/hooks/pre-push
$(MAKE) -C ./damocles-manager/ dev-env
$(MAKE) -C ./damocles-worker/ dev-env
$(MAKE) -C ./damocles-worker-util/ dev-env
docker: docker-manager docker-worker
docker-push: docker-push-manager docker-push-worker
docker-manager:
docker build \
-f Dockerfile.manager \
-t damocles-manager \
--build-arg HTTPS_PROXY=${BUILD_DOCKER_PROXY} \
.
docker-worker:
$(MAKE) -C ./damocles-worker/ docker
TAG:=test
docker-push-manager: docker-manager
docker tag damocles-manager $(PRIVATE_REGISTRY)/filvenus/damocles-manager:$(TAG)
docker push $(PRIVATE_REGISTRY)/filvenus/damocles-manager:$(TAG)
docker-push-worker: docker-worker
docker tag damocles-worker $(PRIVATE_REGISTRY)/filvenus/damocles-worker:$(TAG)
docker push $(PRIVATE_REGISTRY)/filvenus/damocles-worker:$(TAG)