forked from ddev/ddev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnightly_build.mak
35 lines (22 loc) · 1.26 KB
/
nightly_build.mak
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
# This makefile is structured to allow building a complete ddev, with clean/fresh containers at current HEAD.
# Build with a technique like this:
# export VERSION=nightly.$(date +%Y%m%d%H%M%S); make -f nightly_build.mak clean && make -f nightly_build.mak --print-directory VERSION=$VERSION DdevVersion=$VERSION DBTag=$VERSION WebTag=$VERSION DBATag=$VERSION RouterTag=$VERSION NGINX_LOCAL_UPSTREAM_FPM7_REPO_TAG=$VERSION NGINX_LOCAL_UPSTREAM_FPM7_REPO_TAG=$VERSION UPSTREAM_PHP_REPO_TAG=$VERSION
SHELL := /bin/bash
# These dirs must be built in this order (nginx-php-fpm depends on php7)
CONTAINER_DIRS = nginx-proxy docker.php7 docker.nginx-php-fpm docker.nginx-php-fpm-local mysql-docker-local docker.phpmyadmin
BASEDIR=./containers/
.PHONY: $(CONTAINER_DIRS) all build test clean container build submodules
# Build container dirs then build binaries
all: container test
container: submodules $(CONTAINER_DIRS)
clean:
for item in $(CONTAINER_DIRS); do \
echo $$item && $(MAKE) -C $(addprefix $(BASEDIR),$$item) --no-print-directory clean; \
done
$(MAKE) clean
$(CONTAINER_DIRS):
$(MAKE) -C $(addprefix $(BASEDIR),$@) --print-directory test
submodules:
git fetch --all && git submodule update --init && git submodule update --remote
test:
$(MAKE) && $(MAKE) test