forked from agoda-com/docker-emulator-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (38 loc) · 1.48 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
SHELL := /usr/bin/env bash
VERSIONS ?= android-16 android-17 android-18 android-19 android-21 android-22 android-23 android-24 android-25 android-26 android-27 android-28
generate:
for version in $(VERSIONS); do \
mkdir -p ./build/$$version ; \
sed "s/{{ platform }}/$$version/g" templates/Dockerfile > build/$$version/Dockerfile ; \
sed "s/{{ platform }}/$$version/g" templates/config.ini > build/$$version/config.ini ; \
sed "s/{{ platform }}/$$version/g" templates/start.sh > build/$$version/start.sh ; \
sed "s/{{ platform }}/$$version/g" templates/Makefile > build/$$version/Makefile ; \
sed "s/{{ platform }}/$$version/g" templates/snapshot.sh > build/$$version/snapshot.sh ; \
sed "s/{{ platform }}/$$version/g" templates/snapshot.expect > build/$$version/snapshot.expect ; \
sed "s/{{ platform }}/$$version/g" templates/take_snapshot.sh > build/$$version/take_snapshot.sh ; \
cp base/* ./build/$$version ; \
done
clean:
rm -rf ./build
build: generate
for version in $(VERSIONS); do \
$(MAKE) -C build/$$version build; \
done
lint: generate
for version in $(VERSIONS); do \
$(MAKE) -C build/$$version lint; \
done
snapshot: generate build
for version in $(VERSIONS); do \
$(MAKE) -C build/$$version snapshot; \
done
tag: generate
for version in $(VERSIONS); do \
$(MAKE) -C build/$$version tag; \
done
login:
@docker login -u "$(DOCKER_USER)" -p "$(DOCKER_PASS)" "$(PROXY)"
push: login
for version in $(VERSIONS); do \
$(MAKE) -C build/$$version push; \
done