forked from bakape/shamichan
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
69 lines (47 loc) · 1.2 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
64
65
66
67
68
export node_bins=$(PWD)/node_modules/.bin
export uglifyjs=$(node_bins)/uglifyjs
export gulp=$(node_bins)/gulp
export GO111MODULE=on
.PHONY: server client imager test
all: server client
client: client_vendor
$(gulp)
client_deps:
npm install --progress false --depth 0
watch:
$(gulp) -w
client_vendor: client_deps
mkdir -p www/js/vendor
$(uglifyjs) node_modules/almond/almond.js -o www/js/vendor/almond.js
css:
$(gulp) css
generate:
go generate ./...
statik:
statik -src ./static/src -f -dest ./static
server:
go build -v
server_full: generate statik
go build -v
server_force:
go build -v -a
server_force_full: generate statik
go build -v -a
server_update_deps:
go mod download github.com/bakape/thumbnailer/v2
go mod download github.com/bakape/captchouli/v2
server_update_deps_full:
go mod download
client_clean:
rm -rf www/js www/css/*.css www/css/maps
client_clean_full:
rm -rf www/js www/css/*.css www/css/maps node_modules
clean: client_clean
rm -rf .build .ffmpeg .package target meguca-*.zip meguca-*.tar.xz meguca meguca.exe server/pkg
test:
go test --race ./...
test_no_race:
go test ./...
test_docker:
docker-compose build
docker-compose run --rm -e CI=true meguca make test