-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathMakefile.sub
More file actions
36 lines (29 loc) · 809 Bytes
/
Makefile.sub
File metadata and controls
36 lines (29 loc) · 809 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
36
WD = $(shell pwd)
TARGET := $(notdir $(WD))
ROOT := $(abspath $(WD)/../Pillow)
IMAGENAME := $(if $(DOCKER_USERNAME), $(DOCKER_USERNAME)/$(TARGET), $(TARGET))
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
TEST_IMAGE := $(if $(DOCKER_USERNAME), $(DOCKER_USERNAME)/$(TARGET):$(BRANCH), pythonpillow/$(TARGET):main)
.PHONY: build
build:
cp -r ../Pillow/depends .
cp test.sh depends
docker build -t $(IMAGENAME):$(BRANCH) $(DOCKER_ARGS) .
.PHONY: update
update:
./update.sh
.PHONY: test
test:
docker run --rm -v $(ROOT):/Pillow $(IMAGENAME):$(BRANCH)
.PHONY: push
push:
docker push $(IMAGENAME):$(BRANCH)
.PHONY: pull
pull:
docker pull $(DOCKER_ARGS) $(TEST_IMAGE)
.PHONY: clean
clean:
rm -r depends
.PHONY: shell
shell:
docker run --rm -it -v $(ROOT):/Pillow $(IMAGENAME):$(BRANCH) /bin/bash