-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (26 loc) · 1.05 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
.PHONY: test all
# Find current git tag or commit id
REL:=$(shell git describe --always --tags --exact-match || git log --pretty=format:'%h' -n 1)
CURRBRANCH:=$(shell git rev-parse --abbrev-ref HEAD)
all: test dist
test:
PYTHONPATH="./aws:${PYTHONPATH}" py.test test
dbg:
@echo "REL $(REL)"
@echo "CURRBRANCH $(CURRBRANCH)"
dist-reader: temp_reader-$(REL).tar.gz
temp_reader-$(REL).tar.gz: reader/*
rm -rf .dist
mkdir .dist
rsync -rv --exclude "*~" --exclude __pycache__ --exclude .git reader/read_temp.py reader/crontab keys/publisher_key.json reader/read_temp_config.ini reader/sensor.dummy reader/run.sh Pipfile Pipfile.lock .dist/
tar cz --transform="s/\.dist/temp_reader-$(REL)/" -f $@ .dist
dist-lambda:
$(MAKE) aws
release: temp_monitor-$(REL).tar.gz
temp_monitor-$(REL).tar.gz:
rm -rf .dist
mkdir .dist
rsync -rv --exclude "*~" --exclude __pycache__ --exclude .git --exclude "*.tar.gz" . .dist/
tar cz --transform="s/\.dist/temp_reader-$(REL)/" -f $@ .dist
README.html: README.md
pandoc -s -o README.html -f markdown_github -t html README.md