2018-12-22 15:08:04 +00:00
|
|
|
SHELL := /bin/bash
|
|
|
|
|
|
|
|
NS ?= abhinavsingh
|
|
|
|
IMAGE_NAME ?= proxy.py
|
2019-02-09 02:57:44 +00:00
|
|
|
VERSION ?= v0.3
|
2018-12-22 15:08:04 +00:00
|
|
|
IMAGE_TAG := $(NS)/$(IMAGE_NAME):$(VERSION)
|
|
|
|
|
2019-02-09 02:57:44 +00:00
|
|
|
.PHONY: all clean test package test-release release coverage flake8 container
|
2013-12-23 21:51:45 +00:00
|
|
|
|
|
|
|
all: clean test
|
|
|
|
|
|
|
|
clean:
|
|
|
|
find . -name '*.pyc' -exec rm -f {} +
|
|
|
|
find . -name '*.pyo' -exec rm -f {} +
|
|
|
|
find . -name '*~' -exec rm -f {} +
|
2018-12-22 20:43:17 +00:00
|
|
|
rm -f .coverage
|
|
|
|
rm -rf htmlcov
|
2019-02-09 02:57:44 +00:00
|
|
|
rm -rf dist
|
2013-12-23 21:51:45 +00:00
|
|
|
|
|
|
|
test:
|
2014-02-20 21:56:27 +00:00
|
|
|
python tests.py -v
|
2013-12-23 21:51:45 +00:00
|
|
|
|
2019-02-09 02:57:44 +00:00
|
|
|
package: clean
|
|
|
|
python setup.py sdist bdist_wheel
|
2013-12-23 21:51:45 +00:00
|
|
|
|
2019-02-09 02:57:44 +00:00
|
|
|
test-release: package
|
|
|
|
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
|
2018-12-22 15:08:04 +00:00
|
|
|
|
2019-02-09 02:57:44 +00:00
|
|
|
release: package
|
|
|
|
twine upload dist/*
|
|
|
|
|
|
|
|
coverage:
|
2018-12-22 20:43:17 +00:00
|
|
|
coverage run tests.py
|
|
|
|
coverage html
|
|
|
|
|
|
|
|
flake8:
|
2019-02-09 02:57:44 +00:00
|
|
|
flake8 --ignore=E501,W504 --builtins="unicode" proxy.py
|
2018-12-22 20:43:17 +00:00
|
|
|
flake8 --ignore=E501,W504 tests.py
|
|
|
|
|
2019-02-09 02:57:44 +00:00
|
|
|
container:
|
2018-12-22 15:08:04 +00:00
|
|
|
docker build -t $(IMAGE_TAG) .
|