-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (37 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
# Self-Documented Makefile approach, borrowed from: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.DEFAULT_GOAL := help
help:
@grep -E '^[a-zA-Z_.-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
gitsetup: ## Configure config for fresh clone of git repository
git config branch.master.mergeoptions "--no-ff"
git config branch.develop.mergeoptions "--no-ff"
setup: ## Make runtime environment
@echo "Making runtime environment..."
-@pipenv --rm
@pipenv sync --bare
-@pipenv check
devsetup: ## Make runtime environment for development
@echo "Making runtime environment for development..."
-@pipenv --rm
@pipenv sync --bare --dev
-@pipenv check
clean: ## Remove bytecode, cache, build and run files
@echo "Removing bytecode, cache, build and run files..."
@rm -rf `find . -name __pycache__`
@rm -f `find . -type f -name '*.py[co]' `
@rm -rf .cache
@rm -rf .pytest_cache
@rm -rf dist
@rm -rf build
@rm -rf *.egg-info
@rm -rf *.log
codestyle: ## Check code style
@echo "Checking code style..."
@pipenv run pycodestyle ribosome --ignore=E501
@pipenv run pycodestyle *.py --ignore=E501
dist: clean ## Generate Python distribution archive
@pipenv run python setup.py sdist bdist_wheel
upload.test: ## Upload distribution archive to [test.pypi.org]
@pipenv run twine upload --repository-url https://test.pypi.org/legacy/ dist/*
upload.pypi: ## Upload distribution archive to [pypi.org]
@pipenv run twine upload dist/*