forked from python-openapi/openapi-spec-validator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (30 loc) · 947 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
37
38
39
40
41
42
43
44
45
.EXPORT_ALL_VARIABLES:
PROJECT_NAME=openapi-spec-validator
PACKAGE_NAME=$(subst -,_,${PROJECT_NAME})
VERSION=`git describe --abbrev=0`
DOCKER_REGISTRY=p1c2u
PYTHONDONTWRITEBYTECODE=1
params:
@echo "Project name: ${PROJECT_NAME}"
@echo "Package name: ${PACKAGE_NAME}"
@echo "Version: ${VERSION}"
dist-build:
@python setup.py bdist_wheel
dist-cleanup:
@rm -rf build dist ${PACKAGE_NAME}.egg-info
dist-upload:
@twine upload dist/*.whl
test-python:
@python setup.py test
test-cache-cleanup:
@rm -rf .pytest_cache
reports-cleanup:
@rm -rf reports
test-cleanup: test-cache-cleanup reports-cleanup
cleanup: dist-cleanup test-cleanup
docker-build:
@docker build --no-cache --build-arg OPENAPI_SPEC_VALIDATOR_VERSION=${VERSION} -t ${PROJECT_NAME}:${VERSION} .
docker-tag:
@docker tag ${PROJECT_NAME}:${VERSION} ${DOCKER_REGISTRY}/${PROJECT_NAME}:${VERSION}
docker-push:
@docker push ${DOCKER_REGISTRY}/${PROJECT_NAME}:${VERSION}