diff --git a/README.md b/README.md index 86bdb2f..3facb17 100644 --- a/README.md +++ b/README.md @@ -3,22 +3,21 @@ [](https://pkg.go.dev/github.com/cybozu-go/golang-custom-analyzer?tab=overview) [](https://goreportcard.com/report/github.com/cybozu-go/golang-custom-analyzer) -golang custom analyzer -====================== +# golang custom analyzer -This repository contains custom analysers for Go. +This repository contains custom analyzers for Go. ## custom-checker -`custom-checker` is the program to run the following analysers at once: +`custom-checker` is the program to run the following analyzers at once: - `eventuallycheck` - `restrictpkg` ### Usage -```console -$ custom-checker -restrictpkg.packages=html/template,log targetfile.go +```sh +custom-checker -restrictpkg.packages=html/template,log targetfile.go ``` ## `eventuallycheck` @@ -27,8 +26,8 @@ $ custom-checker -restrictpkg.packages=html/template,log targetfile.go ### Usage -```console -$ eventuallycheck [FILES] +```sh +eventuallycheck [FILES] ``` ### Target functions @@ -46,6 +45,6 @@ $ eventuallycheck [FILES] Let `PACKAGE1` and `PACKAGE2` be the names of the packages you want to restrict. -```console -$ restrictpkg -packages PACKAGE1,PACKAGE2,... +```sh +restrictpkg -packages PACKAGE1,PACKAGE2,... ``` diff --git a/docs/release.md b/docs/release.md new file mode 100644 index 0000000..cff9ee2 --- /dev/null +++ b/docs/release.md @@ -0,0 +1,34 @@ +# Release procedure + +This document describes how to release a new version. + +## Labeling + +Release notes are automatically generated based on PRs included in the release. +Those PRs are categorized based on the label assigned to them. +Please refer to `.github/release.yml` for the kind of labels. + +## Versioning + +Follow [semantic versioning 2.0.0][semver] to choose the new version number. + +## Bump version + +1. Determine a new version number. Then set `VERSION` variable. + + ```sh + # Set VERSION and confirm it. It should not have "v" prefix. + VERSION=x.y.z + echo $VERSION + ``` + +2. Add a git tag to the main HEAD, then push it. + + ```sh + git checkout main + git tag -a -m "Release v$VERSION" "v$VERSION" + git tag -ln | grep $VERSION + git push origin v$VERSION + ``` + +[semver]: https://semver.org/spec/v2.0.0.html