forked from camptocamp/docker-odoo-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (38 loc) · 1.12 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
NAME=camptocamp/odoo-project
ifndef VERSION
$(error VERSION is not set)
endif
IMAGE=$(NAME):$(VERSION)
IMAGE_LATEST=$(IMAGE)-latest
export
all: build
.PHONY: build
build:
bash build.sh
.PHONY: tag
tag:
docker tag $(IMAGE_LATEST) $(IMAGE)-$(TAG)
docker tag $(IMAGE_LATEST)-onbuild $(IMAGE)-$(TAG)-onbuild
docker tag $(IMAGE_LATEST)-batteries $(IMAGE)-$(TAG)-batteries
docker tag $(IMAGE_LATEST)-batteries-onbuild $(IMAGE)-$(TAG)-batteries-onbuild
.PHONY: push
push:
docker push $(IMAGE)-$(TAG)
docker push $(IMAGE)-$(TAG)-onbuild
docker push $(IMAGE)-$(TAG)-batteries
docker push $(IMAGE)-$(TAG)-batteries-onbuild
.PHONY: tag_latest_main
tag_latest_main:
docker tag $(IMAGE_LATEST) $(NAME):latest
docker tag $(IMAGE_LATEST)-onbuild $(NAME):latest-onbuild
docker tag $(IMAGE_LATEST)-batteries $(NAME):latest-batteries
docker tag $(IMAGE_LATEST)-batteries-onbuild $(NAME):latest-batteries-onbuild
.PHONY: push_latest_main
push_latest_main:
docker push $(NAME):latest
docker push $(NAME):latest-onbuild
docker push $(NAME):latest-batteries
docker push $(NAME):latest-batteries-onbuild
.PHONY: test
test:
bash test.sh