2014-03-02 03:46:10 +00:00
|
|
|
SHA := $(shell git rev-parse --short HEAD)
|
2014-02-07 10:10:01 +00:00
|
|
|
|
2014-06-21 21:22:38 +00:00
|
|
|
all: build
|
2014-04-10 17:44:26 +00:00
|
|
|
|
|
|
|
deps:
|
2014-06-21 21:22:38 +00:00
|
|
|
# npm install -g uglify-js
|
|
|
|
# npm install -g less
|
2014-06-22 00:41:40 +00:00
|
|
|
# npm -g install karma
|
|
|
|
# npm -g install karma-jasmine
|
|
|
|
# npm -g install karma-chrome-launcher
|
2014-06-22 02:40:21 +00:00
|
|
|
# npm -g install karma-phantomjs-launcher
|
2014-06-12 20:01:11 +00:00
|
|
|
go get github.com/GeertJohan/go.rice/rice
|
2014-06-12 19:55:57 +00:00
|
|
|
go list github.com/drone/drone/... | xargs go get -t -v
|
2014-04-10 17:44:26 +00:00
|
|
|
|
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-04-10 17:44:26 +00:00
|
|
|
|
2014-06-21 21:22:38 +00:00
|
|
|
run:
|
|
|
|
@cd server && go run main.go
|
|
|
|
|
2014-06-04 21:25:38 +00:00
|
|
|
clean:
|
2014-06-21 21:22:38 +00:00
|
|
|
@find . -name "*.out" -delete # remove go coverage output
|
|
|
|
@find . -name "*.sqlite" -delete # remove sqlite databases
|
|
|
|
@find . -name '*.rice-box.go' -delete # remove go rice files & embedded content
|
|
|
|
#@find . -name '*.css' -delete
|
|
|
|
@rm -r debian/drone/usr/local/bin debian/drone.deb server/server client/client server/template/html
|
2014-03-02 05:43:20 +00:00
|
|
|
|
2014-07-09 07:46:15 +00:00
|
|
|
dpkg: rice build deb
|
2014-06-12 00:42:49 +00:00
|
|
|
|
2014-06-21 21:22:38 +00:00
|
|
|
# embeds content in go source code so that it is compiled
|
|
|
|
# and packaged inside the go binary file.
|
|
|
|
rice:
|
|
|
|
cd server && rice embed
|
2014-03-26 21:03:19 +00:00
|
|
|
|
2014-06-04 21:25:38 +00:00
|
|
|
lessc:
|
2014-06-21 21:22:38 +00:00
|
|
|
lessc server/app/styles/drone.less server/app/styles/drone.css
|
|
|
|
lessc --clean-css server/app/styles/drone.less server/app/styles/drone.min.css
|
2014-02-07 10:10:01 +00:00
|
|
|
|
2014-06-21 21:22:38 +00:00
|
|
|
# creates a debian package for drone to install
|
|
|
|
# `sudo dpkg -i drone.deb`
|
|
|
|
deb:
|
2014-06-04 21:25:38 +00:00
|
|
|
mkdir -p debian/drone/usr/local/bin
|
2014-06-21 21:22:38 +00:00
|
|
|
dpkg-deb --build debian/drone
|