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

59 lines
1.8 KiB
Makefile
Raw Normal View History

SHA := $(shell git rev-parse --short HEAD)
2014-02-07 13:10:01 +03:00
all: build
deps:
# which npm && npm -g install uglify-js less
2014-06-12 23:01:11 +03:00
go get github.com/GeertJohan/go.rice/rice
2014-08-04 07:33:47 +03:00
go get github.com/franela/goblin
go list github.com/drone/drone/... | xargs go get -t -v
2014-06-05 00:25:38 +03:00
test:
go vet ./...
go test -cover -short ./...
build:
2014-09-25 07:24:12 +03:00
go build -o debian/drone/usr/local/bin/drone -ldflags "-X main.revision $(SHA)" github.com/drone/drone/cli
go build -o debian/drone/usr/local/bin/droned -ldflags "-X main.revision $(SHA)" github.com/drone/drone/server
2014-07-17 08:14:53 +03:00
install:
install -t /usr/local/bin debian/drone/usr/local/bin/drone
install -t /usr/local/bin debian/drone/usr/local/bin/droned
run:
2014-09-29 04:36:24 +03:00
@go run server/main.go --config=$$HOME/.drone/config.toml
2014-06-05 00:25:38 +03:00
clean:
find . -name "*.out" -delete
rm -f debian/drone/usr/local/bin/drone
rm -f debian/drone/usr/local/bin/droned
rm -f debian/drone.deb
rm -f server/server
2014-09-25 07:24:12 +03:00
rm -f cli/cli
lessc:
lessc --clean-css server/app/styles/drone.less server/app/styles/drone.css
dpkg: build embed deb
2014-06-12 03:42:49 +03:00
# embeds content in go source code so that it is compiled
# and packaged inside the go binary file.
embed:
rice --import-path="github.com/drone/drone/server" append --exec="debian/drone/usr/local/bin/droned"
2014-02-07 13:10:01 +03:00
# creates a debian package for drone to install
# `sudo dpkg -i drone.deb`
deb:
mkdir -p debian/drone/usr/local/bin
mkdir -p debian/drone/var/lib/drone
dpkg-deb --build debian/drone
2014-07-12 01:29:31 +03:00
# deploys drone to a staging server. this requires the following
# environment variables are set:
#
# DRONE_STAGING_HOST -- the hostname or ip
# DRONE_STAGING_USER -- the username used to login
# DRONE_STAGING_KEY -- the identity file path (~/.ssh/id_rsa)
2014-07-12 01:29:31 +03:00
deploy:
scp -i $$DRONE_STAGING_KEY debian/drone.deb $$DRONE_STAGING_USER@$$DRONE_STAGING_HOST:/tmp
ssh -i $$DRONE_STAGING_KEY $$DRONE_STAGING_USER@$$DRONE_STAGING_HOST -- dpkg -i /tmp/drone.deb