-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
36 lines (29 loc) · 861 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
SHELL := bash
.DELETE_ON_ERROR:
.SHELLFLAGS := -eu -o pipefail -c
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
IMAGE := cipheredbytes/url-to-video
.PHONY: docker.build
docker.build:
docker build -t "${IMAGE}" .
docker image inspect "${IMAGE}" --format='{{.Size}}' | numfmt --to=iec-i --format='%10f'
.PHONY: format.js
format.js:
type -p standard >/dev/null || npm install standard --global
standard --fix
.PHONY: docker.run
docker.run:
docker run --rm \
-v /tmp:/recordings/ \
-e URL=https://www.youtube.com/watch?v=PBYKqvDK8d8 \
-e DURATION=20 \
-e OUTPUT_FILENAME=forever_tracey.mp4 \
--shm-size=256m \
"${IMAGE}"
.PHONY: docker.push
docker.push:
docker push "${IMAGE}"
.PHONY: k8s.run
k8s.run:
kubectl create -f ./k8s/job.yaml