-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (28 loc) · 776 Bytes
/
Makefile
File metadata and controls
35 lines (28 loc) · 776 Bytes
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
.DEFAULT_GOAL := all
VIRTUALENV := env
IMAGE := antoniocampello/daily-wellcome-art
VERSION := 2020.2.1
$(VIRTUALENV)/.installed: requirements.txt
@if [ -d $(VIRTUALENV) ]; then rm -rf $(VIRTUALENV); fi
@mkdir -p $(VIRTUALENV)
virtualenv --python python3 $(VIRTUALENV)
$(VIRTUALENV)/bin/pip3 install -r requirements.txt
touch $@
.PHONY: virtualenv
virtualenv: $(VIRTUALENV)/.installed
.PHONY: download_data
download_data:
$(VIRTUALENV)/bin/python3 daily-art/resources/data.py
.PHONY: docker-build
docker-build:
docker build \
-t $(IMAGE):$(VERSION) \
-t $(IMAGE):latest \
.
.PHONY: docker-push
docker-push: docker-build
docker login && \
docker push $(IMAGE):$(VERSION) && \
docker push $(IMAGE):latest
.PHONY: all
all: virtualenv download_data