summaryrefslogtreecommitdiff
path: root/Makefile
blob: 45e59f172bb0db8bb71a2950166799c7b3f391d6 (plain)
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
all: FORCE

pull:
	@rsync -e "ssh ${LIGA_SSH_OPTS}" -q --delete --exclude=_log --exclude=.htaccess --exclude=.git --exclude=.gitignore -urPz ${LIGA_REMOTE_WWW_DIR}/ http
	@chown www-data:www-data http -R

autocommit: pull
	@cd http && git diff --quiet || (date && git gc --quiet && git add . && git commit -m 'Autocommit' && GIT_SSH_COMMAND="ssh ${LIGA_SSH_OPTS}" git push -q)

preseason: FORCE
	@cd preseason && ./check-all.sh

players: FORCE
	./dumps/import-players.sh

teams: players FORCE
	./dumps/check-all-teams.sh

paid: players FORCE
	./dumps/check-all-paid.sh

lineups: FORCE
	./dumps/check-all-lineups.sh

checks: paid teams lineups

backups: FORCE
	./dumps/backup-dbs.sh
	s3cmd -c dumps/.s3config --exclude="*/*" sync dumps/backup/ ${LIGA_S3_BACKUP_BUCKET}

dumps: FORCE
	s3cmd -c dumps/.s3config --exclude="*/*" sync ${LIGA_S3_BUCKET} ./dumps/sync/
	./dumps/fetch-dropbox.sh
	./dumps/fetch-local.sh
	./dumps/load-dumps.sh

butler: FORCE
	python butler/butler.py 1   | mysql ${LIGA_MYSQL_CONNECTION_OPTS}
	python butler/butler.py 2   | mysql ${LIGA_MYSQL_CONNECTION_OPTS}
	python butler/butler.py 1+2 | mysql ${LIGA_MYSQL_CONNECTION_OPTS}

ausbutler: FORCE
	./ausbutler/ausbutler-all.sh

records: FORCE
	direnv exec ./boards/run.sh

brackets: FORCE
	sudo -u www-data -- bash -c 'source .envrc && cd playoff/scripts/ && ./autorun.sh force'

carryovers: FORCE
	./playoff/scripts/pagechecks/check-all.sh ${PHASE}

FORCE: