Repository for git-brws
is hosted at GitHub.
To watch file changes and run linter/tests automatically:
cargo install cargo-watch
cargo watch -x clippy -x test
Some tests require GitHub API access token. To run full tests:
export GITHUB_TOKEN=xxxxxxxxxxx
cargo test
Note: Without GITHUB_TOKEN
environment variable, cargo test
runs test cases partially though it
says every test case was run. This is because cargo test
does not provide a way to skip test cases
dynamically in source.
cargo test
and cargo clippy
are automatically run on pushing to remote by cargo-husky.
But some tests fail when the remote tracking branch does not exist. When you create a new branch,
please use --no-verify
. Please do not use --no-verify
otherwise.
git checkout -b new-branch
git push -u origin new-branch --no-verify
Note: When $GITHUB_TOKEN
environment variable is set, some tests call GET /search/*
GitHub
APIs. They have special rate limit 30/min. Running all unit tests more than twice within 1 minute
would hit the rate limit.
To update manpage file git-brws.1
and docs/index.html
, please edit git-brws.1.ronn
and generate
git-brws.1
automatically with docs/gen.sh
script. ronn is necessary as a dependency.
gem install ronn
./docs/gen.sh
To update Homebrew formula file, please use HomebrewFormula/update.sh
.
For example, when updating to 0.11.6:
./HomebrewFormula/update.sh v0.11.6
To update changelog, please run changelog-from-release after describing release note at GitHub
repository. It regenerates CHANGELOG.md
from releases on GitHub.
go get github.com/rhysd/changelog-from-release
changelog-from-release
- Run
export GITHUB_TOKEN=...
- Ensure documentation is up-to-date by
bash ./docs/gen.sh
- Run
cargo release
which will create a new tag and push it to remote - CI services will prepare binaries
- Write release note at https://github.com/rhysd/git-brws/releases
- Update changelog by
changelog-from-release > CHANGELOG.md
- Update Homebrew formula by
./HomebrewFormula/update.sh {ver}