Contributing
July 8, 2023 ยท View on GitHub
Testing
- benchmarks are
func BenchmarkXxx(b *testing.B) {usego test -v -run=^$ -bench=<BenchmarkXxx> -cpuprofile=prof.cpu ./<path_to_package>, then profilinggo tool pprof <package>.test prof.cpu
Guidelines for pull requests
- Write tests for any changes.
- Separate unrelated changes into multiple pull requests.
- For bigger changes, make sure you start a discussion first by creating an issue and explaining the intended change.
- Ensure the build is green before you open your PR. The Pipelines build won't run by default on a remote branch, so enable Pipelines.
Build
- Go
- To build binary run
./_bin/build.shin shell, it will producetagifybinary. - To install use
./_bin/install.sh, it will puttagifybinary under~/bindirectory assuming it is in yourPATH.
Release
- All notable changes comming with the new version should be documented in CHANGELOG.md.
- Run tests with
./_bin/test.sh, make sure everything is passing. - Bump the
TAGvariable inside theMakefileto the desired version, - Push and trigger new binary release on GitHub via
make tag. - To perform Brew release, use
./_bin/brew_release.sh v[version], then submit a PR to Homebrew repo with the file from./_templates/tagify.rb.