diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 97d58dcc5..581123228 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,6 +9,37 @@ Second, it's written in Go. If you are new to Go, we recommend the following res * [A Tour of Go](https://tour.golang.org/welcome/1) * [The Go documentation](https://golang.org/doc/) +## Requirements + +* Go 1.10+ +* Make +* ... + +## Getting setup + +You should already have [installed Go](https://golang.org/doc/install) and setup your [workspace](https://golang.org/doc/code.html#Workspaces). + +This includes setting a valid `$GOPATH`. + +### 1. Get the repo + +``` +$ go get -u github.com/CircleCI-Public/circleci-cli +$ cd $GOPATH/src/github.com/CircleCI-Public/circleci-cli +``` + +### 2. Build the binary + +``` +$ make +``` + +### 3. Run tests + +``` +$ make test +``` + ## Managing Dependencies We use `dep` for vendoring our depencencies: @@ -80,4 +111,4 @@ You can view the documentation for this project in your browser using `godoc`. After installing it via `make dev`. 1. Run `make doc`. -2. Access http://localhost:6060/pkg/github.com/circleci/circleci-cli/ +2. Access http://localhost:6060/pkg/github.com/CircleCI-Public/circleci-cli/ diff --git a/README.md b/README.md index 52368a2ee..fd8859967 100644 --- a/README.md +++ b/README.md @@ -2,42 +2,24 @@ This project is the seed for CircleCI's new command-line application. -## Requirements - -* Go 1.10+ -* Make -* ... - ## Getting Started -You should already have [installed Go](https://golang.org/doc/install) and setup your [workspace](https://golang.org/doc/code.html#Workspaces). - -This includes setting a valid `$GOPATH`. - -### 1. Get the repo -TODO: make this easier once repo is public +### 1. Get the latest binary -``` -# Setup circleci source in your $GOPATH -$ mkdir -p $GOPATH/src/github.com/circleci -$ cd $GOPATH/src/github.com/circleci - -# Clone the repo -$ git clone git@github.com/circleci/circleci-cli -$ cd circleci-cli -``` +Download the [latest release](https://github.com/CircleCI-Public/circleci-cli/releases/latest) from GitHub for your operating system. If you're on a Mac, this would be `circleci-cli_0.1.X_darwin_amd64.tar.gz`. -### 2. Build the binary +### 2. Put the binary in your $PATH ``` -$ make +$ tar -xvzf circleci-cli_0.1.X_darwin_amd64.tar.gz +$ mv circleci-beta /usr/local/bin ``` -### 3. Run Diagnostic check +### 3. Run a Diagnostic check ``` -$ ./build/target/darwin/amd64/circleci-cli diagnostic +$ circleci-beta diagnostic Please enter your CircleCI API token: OK. @@ -88,7 +70,7 @@ fragment FullType on __Type { You can now pipe that file to the `query` command to send it. ``` -$ cat query.gql | ./build/target/darwin/amd64/circleci-cli query +$ cat query.gql | circleci-beta query ``` This should pretty-print back a JSON response from the server: