Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
configure releasing process
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilsk committed Feb 23, 2024
1 parent b73408e commit 4a158cc
Show file tree
Hide file tree
Showing 7 changed files with 1,009 additions and 117 deletions.
132 changes: 132 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
repository:
has_wiki: false
has_issues: true
has_projects: false

allow_forking: true

allow_merge_commit: false
allow_squash_merge: true
use_squash_pr_title_as_default: true
allow_rebase_merge: true
allow_update_branch: false
allow_auto_merge: false
delete_branch_on_merge: true

default_branch: main

enable_vulnerability_alerts: true
enable_automated_security_fixes: true

branches:
- name: main
protection:
required_linear_history: true

labels:
- name: 'type: bug'
color: '#DA0064'
description: |
A new bug report.
- name: 'type: feature'
color: '#9510AC'
description: |
A new feature request.
- name: 'type: improvement'
color: '#0CA789'
description: |
A new improvement proposal.
- name: 'severity: critical'
color: '#F24727'
description: |
A bug has critical severity and needs to be fixed as soon as possible.
- name: 'severity: major'
color: '#EF8D79'
description: |
A bug has major severity and needs to be fixed in the nearest iteration.
- name: 'severity: minor'
color: '#FBC7BD'
description: |
A bug has minor severity and should be fixed when possible.
- name: 'scope: code'
color: '#808080'
description: |
An issue related to source code.
- name: 'scope: deps'
color: '#949494'
description:
An issue related to dependencies.
- name: 'scope: docs'
color: '#ADADAD'
description: |
An issue related to documentation.
- name: 'scope: test'
color: '#D9D9D9'
description: |
An issue related to tests.
- name: 'scope: inventory'
color: '#EAEAEA'
description: |
An issue related to auxiliary code, e.g. CI config, Makefiles, etc.
- name: 'impact: high'
color: '#652CB3'
description: |
An issue has high impact.
- name: 'impact: medium'
color: '#A380D1'
description: |
An issue has medium impact.
- name: 'impact: low'
color: '#CAB9E1'
description: |
An issue has low impact.
- name: 'effort: hard'
color: '#414BB2'
description: |
An issue is hard to implement or reproduce.
- name: 'effort: medium'
color: '#8D93D1'
description: |
An issue has a medium complexity.
- name: 'effort: easy'
color: '#C6C9E8'
description: |
An issue is easy to implement.
- name: 'status: pending'
color: '#2D9BF1'
description: |
Mark an issue as hold.
- name: 'status: stale'
color: '#3A3A3A'
description: |
Mark an issue as stale.
- name: duplicate
color: '#F8961E'
description: |
An issue or pull request already exists.
- name: good first issue
color: '#90BE6D'
description: |
Good for newcomers.
- name: help wanted
color: '#577590'
description: |
Extra attention is needed.
- name: invalid
color: '#F94144'
description: |
This doesn't seem right.
- name: question
color: '#43AA8B'
description: |
Further information is requested.
- name: wontfix
color: '#F9C74F'
description: |
This will not be worked on.
160 changes: 43 additions & 117 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,134 +1,60 @@
---
project_name: golangci-lint

release:
github:
owner: golangci
name: golangci-lint

builds:
- binary: golangci-lint
goos:
- darwin
- windows
- linux
- freebsd
- netbsd
- illumos
goarch:
- amd64
- arm64
- arm
- 386
- ppc64le
- s390x
- mips64
- mips64le
- riscv64
- loong64
goarm:
- 6
- 7
gomips:
- hardfloat
env:
- CGO_ENABLED=0
ignore:
- goos: darwin
goarch: 386
- goos: freebsd
goarch: arm64
main: ./cmd/golangci-lint/
flags:
- -trimpath
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}}

archives:
- format: tar.gz
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
- id: golangci-lint
files:
- LICENSE
- README.md

snapshot:
name_template: SNAPSHOT-{{ .Commit }}

checksum:
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'

changelog:
sort: asc
filters:
exclude:
- '(?i)^docs?:'
- '(?i)^docs\([^:]+\):'
- '(?i)^docs\[[^:]+\]:'
- '^tests?:'
- '(?i)^dev:'
- '^build\(deps\): bump .* in /docs \(#\d+\)'
- '^build\(deps\): bump .* in /\.github/peril \(#\d+\)'
- Merge pull request
- Merge branch

source:
enabled: true
name_template: '{{ .ProjectName }}-{{ .Version }}-source'
format: tar.gz
name_template: "{{.Binary}}_{{.Version}}_{{.Os}}-{{.Arch}}"

brews:
- repository:
owner: golangci
name: homebrew-tap
folder: Formula
homepage: https://golangci.com
- name: golangci-lint
caveats: ''
commit_author:
name: Kamil Samigullin
email: kamil@samigullin.info
description: Fast linters runner for Go.
folder: Formula
homepage: https://golangci-lint.octolab.org/
repository:
owner: octolab
name: homebrew-tap
install: |
bin.install "golangci-lint"
output = Utils.popen_read("#{bin}/golangci-lint completion bash")
(bash_completion/"golangci-lint").write output
output = Utils.popen_read("#{bin}/golangci-lint completion zsh")
(zsh_completion/"_golangci-lint").write output
output = Utils.popen_read("#{bin}/golangci-lint completion fish")
(fish_completion/"golangci-lint.fish").write output
output = Utils.popen_read("#{bin}/golangci-lint completion zsh")
(zsh_completion/"_golangci-lint").write output
prefix.install_metafiles
test: |
system "#{bin}/golangci-lint --version"
system "#{bin}/golangci-lint version"
builds:
- id: golangci-lint
binary: golangci-lint
env:
- CGO_ENABLED=0
flags:
- -trimpath
goarch:
- amd64
- arm64
goos:
- darwin
- linux
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
main: ./cmd/golangci-lint

checksum: { name_template: checksums.txt }

nfpms:
-
id: golangci-lint-nfpms
package_name: golangci-lint
file_name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
homepage: https://golangci-lint.run/
maintainer: "golangci-lint Team <golangci-releaser@users.noreply.github.com>"
description: Fast linters Runner for Go
license: GPLv3
section: golang
formats:
- deb
- rpm
umask: 0o022
overrides:
deb:
contents:
- src: LICENSE
dst: /usr/share/doc/golangci-lint/copyright
- src: README.md
dst: /usr/share/doc/golangci-lint/README.md
recommends:
- golang-go
rpm:
contents:
- src: LICENSE
dst: /usr/share/doc/golangci-lint/LICENSE
type: license
- src: README.md
dst: /usr/share/doc/golangci-lint/README.md
type: readme
recommends:
- /usr/bin/go
rpm:
group: Development/Tools
release:
github:
owner: kamilsk
name: golangci-lint
38 changes: 38 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## Motivation

As a Go developer, I actively use [`golangci-lint`][golangci-lint] as a static linter,
but it doesn't support the [`looppointer`][looppointer] linter. I need to extend it
to include the linter, which you can enable through the configuration:

```yaml
linters:

enable:
- looppointer
```
or passing the argument
```bash
$ golangci-lint run --enable looppointer ./...
```

[golangci-lint]: https://golangci-lint.run
[looppointer]: https://github.com/kyoh86/looppointer

## What's changed

- The `golangci-lint` supports the `looppointer` linter.
- The tool is available by `brew install octolab/tap/golangci-lint`.
- The installation is also possible by
```bash
$ curl -sSfL https://install.octolab.org/golangci-lint | sh -s -- -b /usr/local/bin
```

## Related issues

- https://github.com/golangci/golangci-lint/issues/1404
- https://github.com/golangci/golangci-lint/pull/1924
- https://github.com/golangci/golangci-lint/compare/master...kamilsk:extended

<p align="right">made with ❤️ for everyone by <a href="https://www.octolab.org/">OctoLab</a></p>
Loading

0 comments on commit 4a158cc

Please sign in to comment.