-
Notifications
You must be signed in to change notification settings - Fork 39
/
Makefile
61 lines (47 loc) · 1.73 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
COMMIT = $(shell git rev-parse --verify HEAD | cut -c1-8)
VERSION = $(shell python setup.py --version)
all: docker-image rpm deb
rpm: rpm-image
docker run --rm -t \
-v $(PWD):/mnt \
-v /tmp/pip-cache-centos:/root/.cache/pip \
-e ITERATION=$(COMMIT) \
pypi-server:centos7 python /mnt/package/make-rpm.py
deb: deb-deb8 deb-deb9 deb-xenial deb-bionic
deb-deb8: deb8-image
docker run --rm -t \
-v $(PWD):/mnt \
-v /tmp/pip-cache-debian:/root/.cache/pip \
-e ITERATION=debian8-$(COMMIT) \
pypi-server:debian8 python3 /mnt/package/make-deb.py
deb-deb9: deb9-image
docker run --rm -t \
-v $(PWD):/mnt \
-v /tmp/pip-cache-debian:/root/.cache/pip \
-e ITERATION=debian9-$(COMMIT) \
pypi-server:debian9 python3 /mnt/package/make-deb.py
deb-xenial: xenial-image
docker run --rm -t \
-v $(PWD):/mnt \
-v /tmp/pip-cache-debian:/root/.cache/pip \
-e ITERATION=xenial-$(COMMIT) \
pypi-server:xenial python3 /mnt/package/make-deb.py
deb-bionic: bionic-image
docker run --rm -t \
-v $(PWD):/mnt \
-v /tmp/pip-cache-debian:/root/.cache/pip \
-e ITERATION=bionic-$(COMMIT) \
pypi-server:bionic python3 /mnt/package/make-deb.py
rpm-image:
docker build -t pypi-server:centos7 -f package/Dockerfile.centos7 package
deb8-image:
docker build -t pypi-server:debian8 -f package/Dockerfile.debian8 package
deb9-image:
docker build -t pypi-server:debian9 -f package/Dockerfile.debian9 package
xenial-image:
docker build -t pypi-server:xenial -f package/Dockerfile.xenial package
bionic-image:
docker build -t pypi-server:bionic -f package/Dockerfile.bionic package
docker-image:
docker build -t mosquito/pypi-server:$(VERSION) .
docker tag mosquito/pypi-server:$(VERSION) mosquito/pypi-server:latest