-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathMakefile
50 lines (40 loc) · 1.66 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
.PHONY: day cron download_moex download_nasdaq graphs_moex graphs_nasdaq travis-push
ifndef DAY
UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
# Mac OS previous day with `date`:
DAY:=$(shell date -v -1d +%Y-%m-%d)
else
DAY:=$(shell date -d "yesterday" +%Y-%m-%d)
endif
endif
day:
@echo "DAY passed: $(DAY)"
cron: graphs_moex graphs_nasdaq
@echo "$(DAY) cron finished"
travis-push:
git config --global user.email "[email protected]"
git config --global user.name "Travis CI"
git checkout master
git status
git add quotes graph_data
git commit quotes graph_data --message "Travis build #${TRAVIS_BUILD_NUMBER} for $(DAY)"
git remote add origin-with-token https://nerevar:${GITHUB_TOKEN}@github.com/nerevar/stock_prices.git
git push origin-with-token HEAD:master
download_moex:
@echo "Download MOEX data for $(DAY)"
python main.py download --engine stock --market bonds --date $(DAY)
python main.py download --engine stock --market shares --date $(DAY)
python main.py download --engine stock --market index --date $(DAY)
python main.py download --engine currency --market selt --date $(DAY)
graphs_moex: download_moex
@echo "Buld graphs for MOEX for $(DAY)"
python main.py graphs --date $(DAY) --graphs eurrub imoex tryrub usdrub yndx_moex sbmx_fxrl
download_nasdaq:
@echo "Download NASDAQ data for $(DAY)"
python main.py download --engine nasdaq --market INX --date $(DAY)
python main.py download --engine nasdaq --market BTC --date $(DAY)
python main.py download --engine nasdaq --market YNDX --date $(DAY)
graphs_nasdaq: download_nasdaq
@echo "Buld graphs for NASDAQ for $(DAY)"
python main.py graphs --date $(DAY) --clear --graphs snp_inx btc yndx_nasdaq