forked from jitsi/docker-jitsi-meet
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
44 lines (31 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
# make sure that .make-env exisis
include .make-env
export
BUILD_ARGS := --build-arg JITSI_REPO=${JITSI_REPO}
BUILD_ARGS += --build-arg WEB_PATCH_REPO=${WEB_PATCH_REPO}
ifeq ($(FORCE_REBUILD), 1)
BUILD_ARGS += --no-cache
endif
all: build-all
release: tag-all push-all
build: versioning
$(MAKE) BUILD_ARGS="$(BUILD_ARGS) --build-arg VERSION=$(VERSION)" -C $(SERVICE) build
tag: versioning
docker tag $(JITSI_REPO)/$(SERVICE):latest $(JITSI_REPO)/$(SERVICE):$(or $(VERSION),$(JITSI_BUILD))
back:
docker tag $(JITSI_REPO)/$(JITSI_SERVICE):$(JITSI_BUILD) $(JITSI_REPO)/$(JITSI_SERVICE):bak
unback:
docker tag $(JITSI_REPO)/$(JITSI_SERVICE):bak $(JITSI_REPO)/$(JITSI_SERVICE):$(JITSI_BUILD)
push: versioning
docker push $(JITSI_REPO)/$(SERVICE):$(or $(VERSION),$(JITSI_BUILD))
%-all:
@$(foreach SERVICE, $(JITSI_SERVICES), $(MAKE) --no-print-directory JITSI_SERVICE=$(SERVICE) $(subst -all,;,$@))
versioning:
$(eval SERVICE_VERSION := $(subst =, ,$(JITSI_SERVICE)))
$(eval SERVICE := $(word 1, $(SERVICE_VERSION)))
$(eval VERSION := $(word 2, $(SERVICE_VERSION)))
clean:
docker-compose stop
docker-compose rm
docker network prune
.PHONY: all build tag push clean