woodpecker/Makefile

54 lines
1.5 KiB
Makefile
Raw Normal View History

SHA := $(shell git rev-parse --short HEAD)
2014-02-07 10:10:01 +00:00
2014-06-12 00:42:49 +00:00
all: rice amberc lessc build
deps:
2014-06-12 20:03:40 +00:00
go get github.com/eknkc/amber/amberc
2014-06-12 20:01:11 +00:00
go get github.com/GeertJohan/go.rice/rice
go list github.com/drone/drone/... | xargs go get -t -v
2014-06-04 21:25:38 +00:00
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
2014-02-07 10:10:01 +00:00
2014-06-04 21:25:38 +00:00
test:
go vet ./...
go test -cover -short ./...
2014-06-04 21:25:38 +00:00
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
2014-02-07 10:10:01 +00:00
2014-06-04 21:25:38 +00:00
#cd cmd/droned/static && rice clean
#cd cmd/droned/template && rice clean
2014-06-12 00:42:49 +00:00
rice:
cd server && rice embed
#cd server/template/html && rice embed
2014-06-04 21:25:38 +00:00
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
2014-06-04 21:25:38 +00:00
lessc:
@lessc server/static/styles/drone.less > server/static/styles/drone.css
2014-02-07 10:10:01 +00:00
2014-06-04 21:25:38 +00:00
uglify:
yui-compressor --type='css' -o 'server/static/styles/drone.min.css' server/static/styles/drone.css
2014-02-07 10:10:01 +00:00
2014-06-04 21:25:38 +00:00
# npm install -g uglifycss
# npm install -g uglify-js
# npm install -g less
2014-02-07 10:10:01 +00:00
# creates a debian package for drone
# to install `sudo dpkg -i drone.deb`
2014-06-12 00:42:49 +00:00
dpkg:
2014-06-04 21:25:38 +00:00
mkdir -p debian/drone/usr/local/bin
-dpkg-deb --build debian/drone
2014-02-07 10:10:01 +00:00
run:
2014-06-12 00:42:49 +00:00
@cd server && go run main.go conf.gomake