-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
51 lines (34 loc) · 1.25 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
# ~
#
# Makefile for managing development/deployment
#
# ------------------------------------------------------
# config
# -----
PROJECT = `grep 'name *= *' setup.cfg | sed 's/.*=//g' | tr -d '[:space:]'`
VERSION = `git show -s --format="%cd-%h" --date=format:'%Y.%m.%d'`
# targets
# -------
.PHONY: help docs info clean init build
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
info: ## list info about package
@echo "$(PROJECT), version $(VERSION)"
@echo last updated: `git log | grep --color=never 'Date:' | head -1 | sed 's/Date: //g'`
clean: ## clean unnecessary files from repository
rm -rf build dist
rm -f ubuntu*.log
rm -rf tests/__pycache__ .pytest_cache .ipynb_*
rm -f roles/*.retry
init: ## intialize repository for development
git submodule init
git submodule update
update: ## update submodules with most recent versions
git submodule update --remote
git add packages
git commit -m "Updated submodules to most recent remote ref."
requirements: init ## install all requirements for using repository
python -m pip install ansible
python -m pip install -r requirements.txt
test: ## run testing suite for module using py.test
py.test