forked from hsdp/python-cf-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (31 loc) · 689 Bytes
/
Makefile
File metadata and controls
35 lines (31 loc) · 689 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
SHELL := /bin/sh
DOCKERIMAGE := python-cf-api:latest
PY2BIN := python2
PY3BIN := python3
.PHONY: test
test:
make docker-run CMD='\
$(PY2BIN) -m nose2 -v && \
$(PY3BIN) -m nose2 -v'
.PHONY: deploy
deploy: test
make docker-run CMD='\
rm -r dist/ || : && \
$(PY3BIN) setup.py sdist && \
$(PY3BIN) -m twine upload \
--verbose \
--repository-url https://upload.pypi.org/legacy/ \
--username '$(PYPI_USERNAME)' \
--password '$(PYPI_PASSWORD)' \
dist/cf_api-*'
.PHONY: docker-image
docker-image:
docker build -t $(DOCKERIMAGE) .
.PHONY: docker-run
docker-run: docker-image
docker run \
--rm -it \
-v $(PWD):/src \
-w /src \
$(DOCKERIMAGE) \
/bin/sh -c '$(CMD)'