forked from abhinavsingh/proxy.py
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (35 loc) · 989 Bytes
/
Makefile
File metadata and controls
48 lines (35 loc) · 989 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
37
38
39
40
41
42
43
44
45
46
47
48
SHELL := /bin/bash
NS ?= abhinavsingh
IMAGE_NAME ?= proxy.py
VERSION ?= v0.4
LATEST_TAG := $(NS)/$(IMAGE_NAME):latest
IMAGE_TAG := $(NS)/$(IMAGE_NAME):$(VERSION)
.PHONY: all clean test package test-release release coverage flake8 container run-container release-container
all: clean test
clean:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
rm -f .coverage
rm -rf htmlcov
rm -rf dist
test:
python tests.py -v
package: clean
python setup.py sdist bdist_wheel
test-release: package
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
release: package
twine upload dist/*
coverage:
coverage run tests.py
coverage html
flake8:
flake8 --ignore=E501,W504 --builtins="unicode" proxy.py
flake8 --ignore=E501,W504 tests.py
container:
docker build -t $(LATEST_TAG) -t $(IMAGE_TAG) .
run-container:
docker run -it -p 8899:8899 --rm $(LATEST_TAG)
release-container:
docker push $(IMAGE_TAG)