- Fork the notifier on github
- Build and test your changes
- Commit and push until you are happy with your contribution
- Make a pull request
- Thanks!
-
Install homebrew
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
-
Install go
brew install go --cross-compile-all
-
Configure
$GOPATH
in~/.bashrc
export GOPATH="$HOME/go" export PATH=$PATH:$GOPATH/bin
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
You can run the tests with
go test ./...
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.
If you are a project maintainer, you can build and release a new version of
bugsnag-go
as follows:
Prerequisite: All code changes should already have been reviewed and PR'd into the next
branch before making a release.
- Decide on a version number and date for this release
- Add an entry (or update the
TBD
entry if it exists) for this release inCHANGELOG.md
so that it includes the version number, release date and granular description of what changed - Update the README if necessary
- Update the version number in
v2/bugsnag.go
and verify that tests pass. - Commit these changes
git commit -am "Preparing release"
- Create a PR from
next
->master
titledRelease vX.X.X
, adding a description to help the reviewer understand the scope of the release - Await PR approval and CI pass
- Merge to master on GitHub, using the UI to set the merge commit message to be
vX.X.X
- Create a release from current
master
on GitHub calledvX.X.X
. Copy and paste the markdown from this release's notes inCHANGELOG.md
(this will create a git tag for you). - Ensure setup guides for Go (and its frameworks) on docs.bugsnag.com are correct and up to date.
- Merge
master
intonext
(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.
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.