2015-05-15 14:55:26 -07:00
|
|
|
.PHONY: dist
|
|
|
|
|
2014-03-01 20:46:10 -07:00
|
|
|
SHA := $(shell git rev-parse --short HEAD)
|
2015-04-07 01:20:55 -07:00
|
|
|
VERSION := 0.4.0-alpha
|
2014-02-07 03:10:01 -07:00
|
|
|
|
2015-08-24 11:25:01 -07:00
|
|
|
# Execute the database test suite against mysql 5.5
|
|
|
|
#
|
|
|
|
# You can launch a mysql container locally for testing:
|
|
|
|
# docker run -rm -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_DATABASE=test -p 3306:3306 mysql:5.5
|
|
|
|
test_mysql:
|
|
|
|
mysql -P 3306 --protocol=tcp -u root -e 'create database if not exists test;'
|
|
|
|
TEST_DRIVER="mysql" TEST_DATASOURCE="root@tcp(127.0.0.1:3306)/test" go test -short github.com/drone/drone/pkg/store/builtin
|
|
|
|
mysql -P 3306 --protocol=tcp -u root -e 'drop database test;'
|
|
|
|
|
2015-05-23 18:52:04 -07:00
|
|
|
run:
|
2015-08-27 11:03:03 +02:00
|
|
|
bin/drone --debug
|
2015-05-17 14:25:04 -07:00
|
|
|
|
2015-05-17 19:25:53 -07:00
|
|
|
# installs the drone binaries into bin
|
|
|
|
install:
|
|
|
|
install -t /usr/local/bin bin/drone
|
|
|
|
install -t /usr/local/bin bin/drone-agent
|
|
|
|
|
2015-08-19 12:38:08 -07:00
|
|
|
docker:
|
|
|
|
docker build --file=cmd/drone-build/Dockerfile.alpine --rm=true -t drone/drone-build .
|
|
|
|
|
2015-05-15 14:55:26 -07: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
|