forked from harness/gitness
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (36 loc) · 1.35 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
SHA := $(shell git rev-parse --short HEAD)
all: build
deps:
go list github.com/drone/drone/... | xargs go get -t
build:
go build -o debian/drone/usr/local/bin/drone -ldflags "-X main.revision $(SHA)" github.com/drone/drone/client
go build -o debian/drone/usr/local/bin/droned -ldflags "-X main.revision $(SHA)" github.com/drone/drone/server
test:
go vet ./...
go test -cover -short ./...
clean:
@find ./ -name '*.out' | xargs rm # remove go coverage output
@find ./ -name '*.sqlite' | xargs rm # remove sqlite databases
rm -rf debian/drone/usr/local/bin/drone
rm -rf debian/drone/usr/local/bin/droned
rm -rf debian/drone.deb
#cd cmd/droned/static && rice clean
#cd cmd/droned/template && rice clean
amberc:
@for f in server/template/*.amber; do $$GOPATH/bin/amberc -pp=true "$$f" > "$${f%.amber}.html"; done
@mkdir -p server/template/html
@mv server/template/*.html server/template/html
lessc:
@lessc server/static/styles/drone.less > server/static/styles/drone.css
uglify:
yui-compressor --type='css' -o 'server/static/styles/drone.min.css' server/static/styles/drone.css
# npm install -g uglifycss
# npm install -g uglify-js
# npm install -g less
# creates a debian package for drone
# to install `sudo dpkg -i drone.deb`
dpkg: build
mkdir -p debian/drone/usr/local/bin
-dpkg-deb --build debian/drone
run:
@cd server && go run main.go conf.go