-
Notifications
You must be signed in to change notification settings - Fork 418
/
Makefile
36 lines (28 loc) · 812 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
ARCH := linux/arm64
REPO := amancevice/superset
PYTHON_VERSION := $(shell cat .python-version)
SUPERSET_VERSION := $(shell grep apache-superset Pipfile | grep -Eo '[0-9.]+')
build: requirements-dev.txt
docker buildx build \
--build-arg PYTHON_VERSION=$(PYTHON_VERSION) \
--platform $(ARCH) \
--tag $(REPO) \
--tag $(REPO):$(SUPERSET_VERSION) \
.
clean:
pipenv --rm
docker image ls --quiet $(REPO) | uniq | xargs docker image rm --force
push:
docker push --all-tags $(REPO)
.PHONY: build clean demo push
requirements-dev.txt: requirements.txt
pipenv requirements --dev > $@
requirements.txt: Pipfile.lock
pipenv requirements > $@
Pipfile.lock: Pipfile | .venv
pipenv lock
.venv: .python-version
-pipenv --rm
mkdir -p $@
pipenv --python $(PYTHON_VERSION)
touch $@