-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
52 lines (39 loc) · 865 Bytes
/
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
51
52
py = python3
video = 'xHP6lpOepk4'
image = 'watcher'
DFLAGS =
# https://youtu.be/DMmJZ1q2ZN8?t=778
ifdef NOCACHE
DFLAGS += --no-cache
endif
.PHONY: build update start stop spawn reboot format
build:
@docker-compose build $(DFLAGS) $(image)
update: .pull
@pkill node
start:
@cd controller; node src/index.js
init:
@cd controller; npm install;
stop:
@docker-compose down
run:
@docker-compose run -d runner
spawn:
@docker-compose run -d -e VIDEO=$(video) --name $(video) $(image)
.gitignore: requirements.txt
@$(py) -m pip install -r requirements.txt
@touch .gitignore
node_modules: package.json
@npm i
format: .gitignore node_modules
@$(py) -m black .
@$(py) -m isort .
@./node_modules/eslint/bin/eslint.js --fix .
.pull:
@git stash
@git reset --hard HEAD
@git checkout develop
@git fetch --all
@git pull
@cd controller; npm install;