github.com/exercism/configlet@v3.9.3-0.20200318193232-c70be6269e71+incompatible/CONTRIBUTING.md (about) 1 # Contributing Guide 2 3 First, thank you! :tada: 4 Exercism would be impossible without people like you being willing to spend time 5 and effort making things better. 6 7 ## Dependencies 8 9 You'll need Go version 1.8 or higher. Follow the directions on 10 http://golang.org/doc/install 11 12 ## Development 13 14 If you've never contributed to a Go project before this is going to feel a 15 little bit foreign. 16 17 The TL;DR is: **don't clone your fork**, and it matters where on your filesystem 18 the project gets cloned to. 19 20 If you don't care how and why and just want something that works, follow these 21 steps: 22 23 1. [fork this repo][fork] 24 1. `go get github.com/exercism/configlet` 25 1. `cd $GOPATH/src/github.com/exercism/configlet` 26 1. `git remote set-url origin https://github.com/<your-github-username>/configlet` 27 1. `go get -u github.com/golang/dep/cmd/dep` 28 1. `dep ensure` 29 30 Then make the change as usual, and submit a pull request. Please provide tests 31 for the changes where possible. 32 33 If you care about the details, check out the blog post [Contributing to Open 34 Source Repositories in Go][contrib-blog] on the Splice blog. 35 36 ## Running the Tests 37 38 To run the tests locally on Linux or MacOS, use 39 40 ``` 41 go test $(go list ./... | grep -v vendor) 42 ``` 43 44 On Windows, the command is more painful (sorry!): 45 46 ``` 47 for /f "" %G in ('go list ./... ^| find /i /v "/vendor/"') do @go test %G 48 ``` 49 50 As of Go 1.9 this is simplified to `go test ./...`. 51 52 ### Cutting a release 53 54 This process could probably be somewhat automated, but for now it's manual. 55 56 1. Bump the version on master, commit with message "Bump version to vX.Y.Z" 57 (actual version, though), and push to GitHub. 58 1. Update the [changelog](/CHANGELOG.md) with all Pull Requests since last 59 version. 60 1. Run `bin/build` to cross-compile for all platforms. The binaries will be 61 built into the `release` directory. 62 1. [Draft a new release][new-release] 63 * Select "recent commits" from the "Target" dropdown, then select the commit 64 where you bumped the version. Drag the releases from your release 65 directory into the drop target in the form. Look at the compare view 66 between the previous release tag and the current master: 67 https://github.com/exercism/configlet/compare/vX.Y.Z...master 68 * Add a title that reflects the most important change. Add a body that adds 69 whatever detail seems relevant. 70 1. Click "publish release" 71 72 Travis will fetch the latest release automatically the next time it tries to 73 build a track repository. 74 75 [fork]: https://github.com/exercism/configlet/fork 76 [contrib-blog]: https://splice.com/blog/contributing-open-source-git-repositories-go/ 77 [new-release]: https://github.com/exercism/configlet/releases/new