Skip to content

Commit 8da44ec

Browse files
committed
CONTRIBUTING: Updated the doc to match the go 'modules' development workflow.
1 parent ef52081 commit 8da44ec

File tree

1 file changed

+16
-21
lines changed

1 file changed

+16
-21
lines changed

CONTRIBUTING.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,28 @@ Exercism would be impossible without people like you being willing to spend time
1010

1111
## Dependencies
1212

13-
You'll need Go version 1.10 or higher. Follow the directions on http://golang.org/doc/install
13+
You'll need Go version 1.11 or higher. Follow the directions on http://golang.org/doc/install
1414

15-
You will also need `dep`, the Go dependency management tool. Follow the directions on https://golang.github.io/dep/docs/installation.html
15+
You will also need to be familiar with the Go `modules` dependency management system. Refer to the [modules wiki page](https://github.com/golang/go/wiki/Modules) to learn more.
1616

1717
## Development
1818

19-
If you've never contributed to a Go project before this is going to feel a little bit foreign.
20-
21-
The TL;DR is: **don't clone your fork**, and it matters where on your filesystem the project gets cloned to.
22-
23-
If you don't care how and why and just want something that works, follow these steps:
19+
A typical development workflow looks like this:
2420

2521
1. [fork this repo on the GitHub webpage][fork]
26-
1. `go get github.com/exercism/cli/exercism`
27-
1. `cd $GOPATH/src/github.com/exercism/cli` (or `cd %GOPATH%\src\github.com\exercism\cli` on Windows)
28-
1. `git remote rename origin upstream`
29-
1. `git remote add origin [email protected]:<your-github-username>/cli.git`
30-
1. `git checkout -b development`
31-
1. `git push -u origin development` (setup where you push to, check it works)
32-
1. `go get -u github.com/golang/dep/cmd/dep`
33-
* depending on your setup, you may need to install `dep` by following the instructions in the [`dep` repo](https://github.com/golang/dep)
34-
1. `dep ensure`
35-
1. `git update-index --assume-unchanged Gopkg.lock` (prevent your dep changes being committed)
22+
1. `cd /path/to/the/development/directory`
23+
1. `git clone https://github.com/<your-github-username>/cli.git`
24+
1. `cd cli`
25+
1. `git remote add upstream https://github.com/exercism/cli.git`
26+
1. Optionally: `git config user.name <your-github-username>` and `git config user.email <your-github-email>`
27+
1. `git checkout -b <development-branch-name>`
28+
1. `git push -u origin <development-branch-name>` (setup where you push to, check it works)
29+
30+
Then make your desired changes and submit a pull request. Please provide tests for the changes where possible.
3631

37-
Then make changes as usual and submit a pull request. Please provide tests for the changes where possible.
32+
Please note that if your development directory is located inside the `GOPATH`, you would need to set the `GO111MODULE=on` environment variable, in order to be able to use the `modules` system.
3833

39-
If you care about the details, check out the blog post [Contributing to Open Source Repositories in Go][contrib-blog] on the Splice blog.
34+
If you wish to learn how to contribute to the Go projects without the `modules`, check out the blog post [Contributing to Open Source Repositories in Go][contrib-blog] on the Splice blog.
4035

4136
## Running the Tests
4237

@@ -56,12 +51,12 @@ damaging your real Exercism submissions, or test different tokens, etc.
5651

5752
On Unices:
5853

59-
- `cd $GOPATH/src/github.com/exercism/cli/exercism && go build -o testercism main.go`
54+
- `cd /path/to/the/development/directory/cli && go build -o testercism main.go`
6055
- `./testercism -h`
6156

6257
On Windows:
6358

64-
- `cd /d %GOPATH%\src\github.com\exercism\cli`
59+
- `cd /d \path\to\the\development\directory\cli`
6560
- `go build -o testercism.exe exercism\main.go`
6661
- `testercism.exe —h`
6762

0 commit comments

Comments
 (0)