-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (30 loc) · 1001 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
34
35
36
37
.PHONY: all dev clean build env-up env-down run
all: clean build env-up run
dev: build run
##### BUILD
build:
@echo "Build ..."
@go build
@echo "Build done"
##### ENV
env-up:
@echo "Starting environment..."
@cd fixtures && docker-compose up --force-recreate -d
@echo "Environment up"
env-down:
@echo "Stopping environment..."
@cd fixtures && docker-compose down
@echo "Environment down"
##### RUN
run:
@echo "Starting run..."
@./island
##### CLEAN
clean: env-down
@echo "Cleaning up..."
@rm -rf /tmp/island* island volumes/* ubuntu-xenial-16.04-cloudimg-console.log
@docker rm -f -v `docker ps -a --no-trunc | grep "example.com" | cut -d ' ' -f 1` 2>/dev/null || true
@docker rm -f -v `docker ps -a --no-trunc | grep "clark" | cut -d ' ' -f 1` 2>/dev/null || true
@docker rmi `docker images --no-trunc | grep "example.com" | cut -d ' ' -f 1` 2>/dev/null || true
@docker rmi `docker images --no-trunc | grep "clark" | cut -d ' ' -f 1` 2>/dev/null || true
@echo "Clean up done"