harness-drone/doc/install-source.md

44 lines
1.2 KiB
Markdown
Raw Normal View History

2015-05-24 01:52:04 +00:00
This document provides a brief overview of Drone's build process, so that you can build and run Drone directly from source. For more detail, please see the `.drone.yml` and `Makefile`.
### Requirements
* Make
* Go 1.4+
* Libsqlite3
### Build and Test
2015-05-24 21:13:56 +00:00
We use `make` to build and package Drone. You can execute the following commands to compile the Drone binary:
2015-05-24 01:52:04 +00:00
```bash
make deps
make
make test
```
The `all` directive compiles binary files to the `bin/` directory and embeds all static content (ie html, javascript, css files) directly into the binary for simplified distribution.
2015-05-24 21:13:56 +00:00
Note: if you experience slow compile times you can `go install` the `go-sqlite3` library from the vendored dependencies. This will prevent Drone from re-compiling on every build:
2015-05-24 01:52:04 +00:00
```bash
go install github.com/drone/drone/Godeps/_workspace/src/github.com/mattn/go-sqlite3
```
### Run
To run Drone you can invoke `make run`. This will start Drone with the `--debug` flag which instructs Drone to server static content from disk. This is helpful if you are doing local development and editing the static JavaScript or CSS files.
### Distribute
To generate a debian package:
```bash
make dist
```
To generate a Docker container:
```bash
docker build --rm=true -t drone/drone .
```