-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (49 loc) · 1.7 KB
/
Makefile
File metadata and controls
68 lines (49 loc) · 1.7 KB
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
#
# synse python client
#
PKG_NAME := $(shell python setup.py --name)
PKG_VERSION := $(shell python setup.py --version)
.PHONY: clean
clean: ## Clean up build artifacts
rm -rf build/ dist/ *.egg-info htmlcov/ .coverage* .pytest_cache/ \
synse/__pycache__ tests/__pycache__ site/
.PHONY: deps
deps: ## Update the frozen pip dependencies (requirements.txt)
tox -e deps
.PHONY: docs
docs: ## Build project documentation locally
@if [ ! -d "docs/_static" ]; then mkdir docs/_static; fi
@if [ ! -d "docs/_templates" ]; then mkdir docs/_templates; fi
tox -e docs
.PHONY: fmt
fmt: ## Automatic source code formatting (isort, autopep8)
tox -e fmt
.PHONY: github-tag
github-tag: ## Create and push a GitHub tag with the current version
git tag -a ${PKG_VERSION} -m "${PKG_NAME} version ${PKG_VERSION}"
git push -u origin ${PKG_VERSION}
.PHONY: lint
lint: ## Run linting checks on the project source code (isort, flake8, twine check)
tox -e lint
.PHONY: test
test: ## Run the project unit tests
tox tests/unit
.PHONY: integration
integration: ## Run the project integration tests
-docker-compose -f compose/integration.yaml rm -fsv
docker-compose -f compose/integration.yaml up -d
sleep 5
tox tests/integration || (docker-compose -f compose/integration.yaml stop; exit 1)
docker-compose -f compose/integration.yaml down
.PHONY: version
version: ## Print the package version
@echo "${PKG_VERSION}"
.PHONY: help
help: ## Print usage information
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
.DEFAULT_GOAL := help
# Jenkins CI Pipeline Targets
.PHONY: unit-test pypi-release
unit-test: test
pypi-release:
tox -e publish