This repository has been archived by the owner on Oct 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (43 loc) · 1.4 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
51
52
53
54
55
56
57
58
59
60
61
62
63
BINARY_PRE=*.go bindata.go css/main.css node_modules/chart.js/dist/Chart.min.js
BINARY_SOURCE=*.go
BINDATA_DATA=css/main.css sql/* templates/* node_modules/chart.js/dist/Chart.min.js
BINDATA_FLAGS=
BINDATA_FLAGS_DEBUG=-debug
SASS_PRE=sass/*.scss
SASS_SOURCE=sass/main.scss
SASS_FLAGS=-t compressed
SASS_FLAGS_DEBUG=-t nested -l
build: bin/plexStats
run: build
bin/plexStats
distribute: build
./distribute.sh
debug: SASS_FLAGS=$(SASS_FLAGS_DEBUG)
debug: BINDATA_FLAGS=$(BINDATA_FLAGS_DEBUG)
debug: build
dependencies:
go get -u github.com/gin-gonic/gin
go get -u github.com/mattn/go-isatty
go get -u github.com/jteeuwen/go-bindata/...
go get -u github.com/elazarl/go-bindata-assetfs/...
go get -u github.com/mattn/go-sqlite3
go get -u github.com/gchaincl/dotsql
go get -u github.com/gin-contrib/multitemplate
go install github.com/mattn/go-sqlite3
clean:
rm -Rf ./bin ./css ./bindata.go ./node_modules
node_modules/chart.js/dist/Chart.min.js: package.json
npm install
touch node_modules/chart.js/dist/Chart.min.js
debug-css: SASS_FLAGS=$(SASS_FLAGS_DEBUG)
debug-css: css/main.css
css/main.css: $(SASS_PRE)
mkdir -p css
sassc $(SASS_FLAGS) $(SASS_SOURCE) $@
debug-bindata: BINDATA_FLAGS=$(BINDATA_FLAGS_DEBUG)
debug-bindata: bindata.go
bindata.go: $(BINDATA_DATA)
go-bindata $(BINDATA_FLAGS) -o $@ $(BINDATA_DATA)
bin/plexStats: $(BINARY_PRE)
mkdir -p bin
go build -o bin/plexStats $(BINARY_SOURCE)