Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release.md #5

Merged
merged 2 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@
[![PkgGoDev](https://pkg.go.dev/badge/github.com/cybozu-go/golang-custom-analyzer?tab=overview)](https://pkg.go.dev/github.com/cybozu-go/golang-custom-analyzer?tab=overview)
[![Go Report Card](https://goreportcard.com/badge/github.com/cybozu-go/golang-custom-analyzer)](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`
Expand All @@ -27,8 +26,8 @@ $ custom-checker -restrictpkg.packages=html/template,log targetfile.go

### Usage

```console
$ eventuallycheck [FILES]
```sh
eventuallycheck [FILES]
```

### Target functions
Expand All @@ -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,...
```
34 changes: 34 additions & 0 deletions docs/release.md
Original file line number Diff line number Diff line change
@@ -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
Loading