forked from Yelp/schematizer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
60 lines (45 loc) · 1.51 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
REBUILD_FLAG =
.PHONY: help all production clean docs test debug itest cook-image docker-push install-hooks
help:
@echo "clean - remove artifacts"
@echo "debug - run tests and allow interactive breaks on ipbd.set_trace()"
@echo "docs - generate Sphinx HTML documentation, including API docs"
@echo "test - run tests quickly with the default Python"
@echo "itest - cook the image and do paasta local run acceptance tests"
@echo "cook-image - only cook the docker image"
@echo "docker-push - push a new docker image"
@echo "install-hooks - Install the pre-commit hooks"
@echo "get-venv-update - fetched the latest version of venv-update"
all: production install-hooks
production:
@true
clean:
rm -fr build/
rm -fr dist/
rm -fr *.egg-info
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -rf {} +
rm -rf docs/build/*
rm -rf .tox/
docs:
tox -e docs
test:
tox -c tox.ini $(REBUILD_FLAG)
debug:
tox $(REBUILD_FLAG) -- -s
itest: cook-image
paasta local-run -s schematizer -t --instance main --cluster everywhere-testopia
tox -c tox.ini -e acceptance
DOCKER_TAG ?= schematizer-dev-$(USER)
cook-image:
docker build --file=Dockerfile -t $(DOCKER_TAG) .
export GIT_SHA ?= $(shell git rev-parse --short HEAD)
docker-push:
tox -e docker-push
install-hooks:
tox -e pre-commit -- install -f --install-hooks
.PHONY: push-swagger-spec-to-registry
push-swagger-spec-to-registry:
swagger post schematizer api_docs/swagger.json