Skip to content

Latest commit

 

History

History
90 lines (60 loc) · 3.19 KB

CONTRIBUTING.md

File metadata and controls

90 lines (60 loc) · 3.19 KB

Contributing

Installing the go development environment

  1. Install homebrew

    ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
    
  2. Install go

    brew install go --cross-compile-all
    
  3. Configure $GOPATH in ~/.bashrc

    export GOPATH="$HOME/go"
    export PATH=$PATH:$GOPATH/bin
    

Downloading the code

You can download the code and its dependencies using

go get -t github.com/bugsnag/bugsnag-go/v2

It will be put into "$GOPATH/src/github.com/bugsnag/bugsnag-go"

Then install depend

Running Tests

You can run the tests with

go test ./...

Making PRs

All PRs should target the next branch as their base. This means that we can land them and stage them for a release without making multiple changes to master (which would cause multiple releases due to go get's behaviour).

The exception to this rule is for an urgent bug fix when next is already ahead of master. See hotfixes for what to do then.

Releasing a New Version

If you are a project maintainer, you can build and release a new version of bugsnag-go as follows:

Planned releases

Prerequisite: All code changes should already have been reviewed and PR'd into the next branch before making a release.

  1. Decide on a version number and date for this release
  2. Add an entry (or update the TBD entry if it exists) for this release in CHANGELOG.md so that it includes the version number, release date and granular description of what changed
  3. Update the README if necessary
  4. Update the version number in v2/bugsnag.go and verify that tests pass.
  5. Commit these changes git commit -am "Preparing release"
  6. Create a PR from next -> master titled Release vX.X.X, adding a description to help the reviewer understand the scope of the release
  7. Await PR approval and CI pass
  8. Merge to master on GitHub, using the UI to set the merge commit message to be vX.X.X
  9. Create a release from current master on GitHub called vX.X.X. Copy and paste the markdown from this release's notes in CHANGELOG.md (this will create a git tag for you).
  10. Ensure setup guides for Go (and its frameworks) on docs.bugsnag.com are correct and up to date.
  11. Merge master into next (since we just did a merge commit the other way, this will be a fastforward update) and push it so that it is ready for future PRs.

Hotfixes

If a next branch already exists and is ahead of master but there is a bug fix which needs to go out urgently, check out the latest master and create a new hotfix branch git checkout -b hotfix. You can then proceed to follow the above steps, substituting next for hotfix.

Once released, ensure master is merged into next so that the changes made on hotfix are included.