forked from vhive-serverless/vSwarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (22 loc) · 825 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
BUCKET = ${AWS_TEST_BUCKET}
BIN_DIR = ./bin
PROG_NAME = word_count
.PHONY: all clean $(PROG_NAME) input_in_s3 push
all: $(PROG_NAME)
$(PROG_NAME):
go build -o $(BIN_DIR)/$@ .
input_in_s3:
aws s3 cp ./metamorphosis.txt s3://${BUCKET}
push:
docker build --tag docker.io/vhiveease/word_count:local -f ./Dockerfile ../..
docker push docker.io/vhiveease/word_count:local
test_wc_local: $(PROG_NAME)
$(BIN_DIR)/$(PROG_NAME) metamorphosis.txt
test_wc_s3: $(PROG_NAME) input_in_s3
$(BIN_DIR)/$(PROG_NAME) --out s3://${BUCKET}/ s3://${BUCKET}/metamorphosis.txt
test_wc_lambda: $(PROG_NAME) input_in_s3
$(BIN_DIR)/$(PROG_NAME) --lambda --out s3://${BUCKET}/ s3://${BUCKET}/metamorphosis.txt
clean:
find . -name "*.out" -print0 | xargs -0 rm
rm -f $(BIN_DIR)/$(PROG_NAME) output*
aws s3 rm s3://${BUCKET} --recursive