-
Notifications
You must be signed in to change notification settings - Fork 27
/
Makefile
48 lines (33 loc) · 1003 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
46
47
48
# This makefile is used to make it easier to get the project set up
# to be ready for development work in the local sandbox.
# example: "make setup"
PYTHON=python3
LINT=black
LINT_DIRS=ibm_cloud_sdk_core test test_integration
setup: deps dev-deps install-project
all: upgrade-pip setup test-unit lint
ci: all
publish-release: build-dist publish-dist
upgrade-pip:
${PYTHON} -m pip install --upgrade pip
deps:
${PYTHON} -m pip install .
dev-deps:
${PYTHON} -m pip install .[dev]
publish-deps:
${PYTHON} -m pip install .[publish]
install-project:
${PYTHON} -m pip install -e .
test-unit:
${PYTHON} -m pytest --cov=ibm_cloud_sdk_core test
lint:
${PYTHON} -m pylint ${LINT_DIRS}
${LINT} --check ${LINT_DIRS}
lint-fix:
${LINT} ${LINT_DIRS}
build-dist:
rm -fr dist
${PYTHON} -m build
# This target requires the TWINE_PASSWORD env variable to be set to the user's pypi.org API token.
publish-dist:
TWINE_USERNAME=__token__ ${PYTHON} -m twine upload --non-interactive --verbose dist/*