1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-12 08:23:48 +02:00
woodpecker/Makefile

56 lines
1.7 KiB
Makefile
Raw Normal View History

2015-05-15 23:55:26 +02:00
.PHONY: dist
SHA := $(shell git rev-parse --short HEAD)
VERSION := 0.4.0-alpha
2014-02-07 13:10:01 +03:00
all: concat bindata build
deps:
go get github.com/jteeuwen/go-bindata/...
2014-06-05 00:25:38 +03:00
test:
2015-05-22 20:37:40 +02:00
go vet github.com/drone/drone/pkg/...
go vet github.com/drone/drone/cmd/...
go test -cover -short github.com/drone/drone/pkg/...
build:
2015-05-19 00:47:48 +02:00
go build -o bin/drone -ldflags "-X main.revision $(SHA) -X main.version $(VERSION).$(SHA)" github.com/drone/drone/cmd/drone-server
go build -o bin/drone-agent -ldflags "-X main.revision $(SHA) -X main.version $(VERSION).$(SHA)" github.com/drone/drone/cmd/drone-agent
2015-05-18 19:05:58 +02:00
2015-05-24 03:52:04 +02:00
run:
bin/drone-server --debug
2014-06-05 00:25:38 +03:00
clean:
find . -name "*.out" -delete
2015-05-22 20:37:40 +02:00
find . -name "*_bindata.go" -delete
rm -f bin/drone*
concat:
2015-05-22 20:37:40 +02:00
cat cmd/drone-server/static/scripts/drone.js \
cmd/drone-server/static/scripts/services/*.js \
cmd/drone-server/static/scripts/filters/*.js \
cmd/drone-server/static/scripts/controllers/*.js \
cmd/drone-server/static/scripts/term.js > cmd/drone-server/static/scripts/drone.min.js
2015-05-18 04:25:53 +02:00
# installs the drone binaries into bin
install:
install -t /usr/local/bin bin/drone
install -t /usr/local/bin bin/drone-agent
# embeds all the static files directly
# into the drone binary file
bindata:
$$GOPATH/bin/go-bindata -o="cmd/drone-server/drone_bindata.go" cmd/drone-server/static/...
2015-04-28 23:39:48 +02:00
bindata_debug:
$$GOPATH/bin/go-bindata --debug -o="cmd/drone-server/drone_bindata.go" cmd/drone-server/static/...
2015-05-15 23:55:26 +02: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