2015-05-15 21:55:26 +00:00
|
|
|
.PHONY: dist
|
|
|
|
|
2014-03-02 03:46:10 +00:00
|
|
|
SHA := $(shell git rev-parse --short HEAD)
|
2015-04-07 08:20:55 +00:00
|
|
|
VERSION := 0.4.0-alpha
|
2014-02-07 10:10:01 +00:00
|
|
|
|
2015-04-25 23:16:56 +00:00
|
|
|
all: concat bindata build
|
2014-04-10 17:44:26 +00:00
|
|
|
|
|
|
|
deps:
|
2014-10-10 08:46:41 +00:00
|
|
|
go get -t -v ./...
|
2014-04-10 17:44:26 +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-07-14 02:41:08 +00:00
|
|
|
build:
|
2015-05-15 21:55:26 +00:00
|
|
|
go build -o bin/drone -ldflags "-X main.revision $(SHA) -X main.version $(VERSION).$(SHA)"
|
2014-06-21 21:22:38 +00:00
|
|
|
|
2014-06-04 21:25:38 +00:00
|
|
|
clean:
|
2014-07-14 02:41:08 +00:00
|
|
|
find . -name "*.out" -delete
|
2015-04-07 08:20:55 +00:00
|
|
|
rm -f drone
|
2015-04-25 23:16:56 +00:00
|
|
|
rm -f bindata.go
|
|
|
|
|
|
|
|
concat:
|
|
|
|
cat server/static/scripts/drone.js \
|
|
|
|
server/static/scripts/services/*.js \
|
|
|
|
server/static/scripts/filters/*.js \
|
|
|
|
server/static/scripts/controllers/*.js \
|
2015-04-26 04:27:24 +00:00
|
|
|
server/static/scripts/term.js > server/static/scripts/drone.min.js
|
2015-04-25 23:16:56 +00:00
|
|
|
|
2015-04-28 21:39:48 +00:00
|
|
|
bindata_deps:
|
|
|
|
go get github.com/jteeuwen/go-bindata/...
|
|
|
|
|
2015-04-25 23:16:56 +00:00
|
|
|
bindata_debug:
|
2015-04-28 21:39:48 +00:00
|
|
|
$$GOPATH/bin/go-bindata --debug server/static/...
|
2015-04-25 23:16:56 +00:00
|
|
|
|
|
|
|
bindata:
|
2015-04-28 21:39:48 +00:00
|
|
|
$$GOPATH/bin/go-bindata server/static/...
|
2015-05-15 21:55:26 +00:00
|
|
|
|
|
|
|
# creates a debian package for drone
|
|
|
|
# to install `sudo dpkg -i drone.deb`
|
|
|
|
dist:
|
|
|
|
mkdir -p dist/drone/usr/local/bin
|
|
|
|
mkdir -p dist/drone/var/lib/drone
|
|
|
|
mkdir -p dist/drone/var/cache/drone
|
|
|
|
cp bin/drone dist/drone/usr/local/bin
|
|
|
|
-dpkg-deb --build dist/drone
|