Skip to content

Commit

Permalink
Clarify the building-from-source steps
Browse files Browse the repository at this point in the history
  • Loading branch information
robingustafsson committed Jan 19, 2018
1 parent ed5ca55 commit fedbb2f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,25 @@ Once that's done, you can get the k6 source into your Go workspace (`$GOPATH/src
```bash
go get github.com/loadimpact/k6
```
This will also build a `k6` binary and put it in `$GOPATH/bin`.

**Building from source**:

Now, standing in the repo root (`$GOPATH/src/github.com/loadimpact/k6`) you can build a k6 binary from source by running:
Standing in the repo root (`$GOPATH/src/github.com/loadimpact/k6`) you can build a k6 binary from source by running:
```bash
cd $GOPATH/src/github.com/loadimpact/k6
go build
```

**Running the linter**:

We make use of the [`gometalinter`]() tool to lint the code in CI. To run it locally:
We make use of the [gometalinter](https://github.com/alecthomas/gometalinter) tool to lint the code in CI. To run it locally, first install it:
```bash
go get -u github.com/alecthomas/gometalinter
gometalinter --install
```
then run:
```
gometalinter --deadline 10m --config gometalinter.json --vendor ./...
```

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ docker pull loadimpact/k6
Grab a prebuilt binary from [the Releases page](https://github.com/loadimpact/k6/releases).

### Build from source
To build from source you need **[Git](https://git-scm.com/downloads)** and **[Go](https://golang.org/doc/install)** (1.8 or newer). Follow these instruction for fast building:
To build from source you need **[Git](https://git-scm.com/downloads)** and **[Go](https://golang.org/doc/install)** (1.8 or newer). Follow these instructions:

- Get source `go get github.com/loadimpact/k6`
- Now `cd` to `$GOPATH/src/github.com/loadimpact/k6` and run `go build`
- Tada, you can now run k6 using `./k6 run script.js`

Then make sure to put the `k6` binary somewhere in your PATH.
- Run `go get github.com/loadimpact/k6` which will:
- git clone the repo and put the source in `$GOPATH/src/github.com/loadimpact/k6`
- build a `k6` binary and put it in `$GOPATH/bin`
- Make sure you have `$GOPATH/bin` in your PATH
- Tada, you can now run k6 using `k6 run script.js`

Quick start
-----------
Expand Down

0 comments on commit fedbb2f

Please sign in to comment.