forked from sondretj/circleci-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (22 loc) · 994 Bytes
/
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
BUNDLES = \
android node python ruby golang php \
postgres mariadb mysql mongo dynamodb elixir erlang \
jruby clojure openjdk buildpack-deps redis rust
images: $(foreach b, $(BUNDLES), $(b)/generate_images)
%/generate_images:
cd $(@D) && ./generate-images
example_images: $(foreach b, $(BUNDLES), $(b)/example_images)
%/example_images:
./shared/images/example.sh $(@D)
publish_images: images
find . -name Dockerfile | awk '{ print length, $0 }' | sort -n -s | cut -d" " -f2- | sed 's|/Dockerfile|/publish_image|g' | xargs -n1 make
%/publish_images: %/generate_images
find ./$(@D) -name Dockerfile | awk '{ print length, $$0 }' | sort -n -s | cut -d" " -f2- | sed 's|/Dockerfile|/publish_image|g' | xargs -n1 make
%/publish_image: %/Dockerfile
./shared/images/build.sh ./$(@D)/Dockerfile
clean: $(foreach b, $(BUNDLES), $(b)/clean)
%/clean:
cd $(@D) ; rm -r images || true
list_bundles: $(foreach b, $(BUNDLES), $(b)/echo_bundle)
%/echo_bundle:
echo $(@D) >> BUNDLES.txt