-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
46 lines (36 loc) · 1 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
DOCKER_IMAGE_NAME := theoldmoon0602/shellgeibot
BUILD_COMMAND := DOCKER_BUILDKIT=1 docker image build -t $(DOCKER_IMAGE_NAME)
subdirs := egison
all: build
.PHONY: $(subdirs)
$(subdirs):
make -C $@ $(MAKECMDGOALS)
build: prefetch buildlog revisionlog $(subdirs)
$(BUILD_COMMAND) .
build-ci: prefetch buildlog revisionlog
$(BUILD_COMMAND) --progress=plain .
prefetch:
./prefetch_files.sh
buildlog:
./get_build_log.sh > ci_build.log
revisionlog:
git log --pretty="format:%h %cd %s [%an]" --date=iso -n 20 > revision.log
test:
docker container run \
--rm \
--net none \
--oom-kill-disable \
--pids-limit 1024 \
-v $(CURDIR):/root/src \
$(DOCKER_IMAGE_NAME) \
/bin/bash -c "bats --print-output-on-failure /root/src/docker_image.bats"
test-ci:
@docker container run \
--rm \
--net none \
-v $(CURDIR):/root/src \
$(DOCKER_IMAGE_NAME) \
/bin/bash -c "bats --print-output-on-failure --tap /root/src/docker_image.bats"
clean: $(subdirs)
rm -f *.log
rm -f prefetched/*/*.gz prefetched/*/*.zip