-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
47 lines (40 loc) · 1.16 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
# Use bash syntax
SHELL := /bin/bash
.PHONY: all
all: container run
.PHONY: test-docker
test-docker:
@if [[ "$(shell docker images -q build-your-own-archlinux-repository)" = "" ]]; then \
echo "Before to use Docker container, you must install it. Please execute the command 'make container'."; \
exit 1; \
fi
.PHONY: container
container:
@docker build --pull \
--build-arg USER_ID=$(shell id -u) \
--build-arg TRAVIS=$(TRAVIS) \
--tag=build-your-own-archlinux-repository ./
.PHONY: test
test: test-docker
@docker run \
--volume="$(shell pwd)":/home/bot/remote \
--init --interactive --tty build-your-own-archlinux-repository \
python bot test
.PHONY: run
run: test-docker update
@docker run \
--volume="$(shell pwd)":/home/bot/remote \
--init --tty build-your-own-archlinux-repository \
python bot build
.PHONY: update
update: test-docker
@docker run \
--volume="$(shell pwd)":/home/bot/remote \
--init --tty build-your-own-archlinux-repository \
python bot update
.PHONY: validation
validation: test-docker
@docker run \
--volume="$(shell pwd)":/home/bot/remote \
--init --tty build-your-own-archlinux-repository \
python bot validation