-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile
69 lines (59 loc) · 1.76 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
61
62
63
64
65
66
67
68
69
SHELL := /bin/bash -euxo pipefail
# Treat Sphinx warnings as errors
SPHINXOPTS := -W
include lint.mk
.PHONY: lint
# We do not currently run pydocstyle as we have to ignore vendored items.
lint: \
check-manifest \
custom-linters \
doc8 \
flake8 \
isort \
linkcheck \
mypy \
pip-extra-reqs \
pip-missing-reqs \
pylint \
pyroma \
shellcheck \
spelling \
vulture \
yapf
# Fix some linting errors.
.PHONY: fix-lint
fix-lint:
# Move imports to a single line so that autoflake can handle them.
# See https://github.com/myint/autoflake/issues/8.
# Then later we put them back.
isort --force-single-line --recursive --apply
$(MAKE) autoflake
isort --recursive --apply
$(MAKE) fix-yapf
.PHONY: docs-library
docs-library:
make -C docs/library clean html SPHINXOPTS=$(SPHINXOPTS)
.PHONY: docs-cli
docs-cli:
make -C docs/cli clean html SPHINXOPTS=$(SPHINXOPTS)
.PHONY: docs
docs: docs-library docs-cli
.PHONY: open-docs
open-docs:
python -c 'import os, webbrowser; webbrowser.open("file://" + os.path.abspath("docs/library/build/html/index.html"))'
python -c 'import os, webbrowser; webbrowser.open("file://" + os.path.abspath("docs/cli/build/html/index.html"))'
# We pull Docker images before the tests start to catch any flakiness early.
# See https://jira.d2iq.com/browse/DCOS_OSS-2120 for details of
# flakiness.
.PHONY: pull-images
pull-images:
# These are the base images for operating systems used.
docker pull ubuntu:xenial
docker pull centos:7
docker pull quay.io/shift/coreos:stable-1298.7.0
# This is used by the ``minidcos docker doctor`` command.
docker pull luca3m/sleep
# This is used for testing installation.
docker pull linuxbrew/linuxbrew
# This is required for making Linux binaries
docker pull python:3.7