-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathMakefile
44 lines (37 loc) · 1.06 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
VERSION = $(shell cat VERSION)
ifeq ($(shell uname), Darwin)
# Get this with: `brew install gnu-sed`
SED = gsed
else
SED = sed
endif
help: ## Shows this help
@echo "$$(grep -h '#\{2\}' $(MAKEFILE_LIST) | sed 's/: #\{2\} / /' | column -t -s ' ')"
clean: ## Remove temporary files
find . -name "*.pyc" -delete
find . -name ".DS_Store" -delete
rm -rf *.egg
rm -rf *.egg-info
rm -rf __pycache__
rm -rf build
rm -rf dist
test: ## Run test suite
python -m unittest discover
.PHONY: version
version:
@$(SED) -i -r /version/s/[0-9.]+/$(VERSION)/ setup.py
@$(SED) -i -r /__version__/s/[0-9.]+/$(VERSION)/ leadbutt.py
# Release instructions
# 1. bump VERSION file
# 2. run `make release`
# 3. `git push --tags origin master`
# 4. update release notes
release: clean version
@-git commit -am "bump version to v$(VERSION)"
@-git tag $(VERSION)
@-pip install wheel > /dev/null
python setup.py sdist bdist_wheel upload
# makes it easier to test setup.py's entry points
install: ## Install this package locally
-pip uninstall cloudwatch-to-graphite --yes
pip install .