-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (36 loc) · 1.03 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
LOCAL_BIN ?= ./.env
.PHONY: install.golangci
install.golangci:
mkdir -p $(LOCAL_BIN) && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(LOCAL_BIN) v1.61.0
.PHONY: build
build:
go build -o ./bin/tvgif
.PHONY: validate-srts
validate-srts: build
ifndef MEDIA_PATH
$(error "MEDIA_PATH was not defined in environment")
endif
./bin/tvgif importer validate-srt $(MEDIA_PATH)
.PHONY: recreate-meta
recreate-meta: build
ifndef MEDIA_PATH
$(error "MEDIA_PATH was not defined in environment")
endif
./bin/tvgif importer srt --clean=true $(MEDIA_PATH)
.PHONY: update-meta
update-meta: build
ifndef MEDIA_PATH
$(error "MEDIA_PATH was not defined in environment")
endif
./bin/tvgif importer srt $(MEDIA_PATH)
.PHONY: refresh
refresh: update-meta
./bin/tvgif importer refresh-index && ./bin/tvgif importer refresh-db
.PHONY: clean
clean:
rm -rf ./var/index/*
rm -rf ./var/dialog.sqlite3
rm -rf ./var/metadata/*.json ./var/metadata/.manifest.json
.PHONY: lint
lint:
./.env/golangci-lint run