Skip to content

Commit 337060e

Browse files
committed
housekeeping: update .goreleaser.yml with schema, build tweaks, changelog filters, and formatting improvements
1 parent 9a1ad27 commit 337060e

1 file changed

Lines changed: 70 additions & 65 deletions

File tree

.goreleaser.yml

Lines changed: 70 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,99 @@
1-
# Build customization
1+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
2+
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
3+
4+
version: 2
5+
6+
env:
7+
- GO111MODULE=on
8+
9+
before:
10+
hooks:
11+
- go mod download
12+
213
builds:
314
- id: txeh
4-
# Path to main.go file.
5-
# Default is `main.go`
615
main: ./txeh/txeh.go
716
binary: txeh
8-
9-
env:
10-
- CGO_ENABLED=0
11-
12-
# GOOS list to build in.
13-
# For more info refer to https://golang.org/doc/install/source#environment
14-
# Defaults are darwin and linux
1517
goos:
16-
- linux
17-
- darwin
18-
- windows
19-
20-
# GOARCH to build in.
21-
# For more info refer to https://golang.org/doc/install/source#environment
22-
# Defaults are 386 and amd64
18+
- linux
19+
- darwin
20+
- windows
2321
goarch:
24-
- amd64
25-
- arm
26-
- arm64
27-
28-
goarm:
29-
- "6"
30-
- "7"
22+
- "386"
23+
- amd64
24+
- arm
25+
- arm64
26+
ignore:
27+
- goos: windows
28+
goarch: arm64
29+
- goos: windows
30+
goarch: arm
31+
mod_timestamp: '{{ .CommitTimestamp }}'
32+
env:
33+
- CGO_ENABLED=0
34+
flags:
35+
- -trimpath
36+
- -tags=netgo
37+
- -a
38+
- -v
39+
ldflags: -s -w -X github.com/txn2/txeh/txeh/cmd.Version={{.Version}}
3140

32-
ldflags: "-s -w -X github.com/txn2/txeh/txeh/cmd.Version={{.Version}}"
41+
archives:
42+
- id: default
43+
name_template: >-
44+
{{ .ProjectName }}_
45+
{{- title .Os }}_
46+
{{- if eq .Arch "amd64" }}x86_64
47+
{{- else if eq .Arch "386" }}i386
48+
{{- else }}{{ .Arch }}{{ end }}
49+
{{- if .Arm }}v{{ .Arm }}{{ end }}
50+
format_overrides:
51+
- goos: windows
52+
formats: [zip]
3353

3454
checksum:
3555
name_template: '{{ .ProjectName }}_checksums.txt'
3656

37-
release:
38-
github:
39-
owner: txn2
40-
name: txeh
41-
name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}"
42-
43-
# You can disable this pipe in order to not upload any artifacts to
44-
# GitHub.
45-
# Defaults to false.
46-
disable: false
57+
changelog:
58+
sort: asc
59+
filters:
60+
exclude:
61+
- '^docs:'
62+
- '^test:'
63+
- Merge pull request
64+
- Merge branch
65+
- go mod tidy
4766

4867
nfpms:
49-
- file_name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
50-
homepage: https://github.com/txn2/txeh
68+
- id: default
69+
file_name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
70+
homepage: https://github.com/txn2/txeh
5171
description: Etc Hosts Management Utility.
52-
maintainer: Craig Johnston <cjimti@gmail.com>
72+
maintainer: Craig Johnston <cj@imti.co>
5373
license: Apache 2.0
54-
vendor: https://github.com/txn2
74+
vendor: txn2
5575
formats:
5676
- apk
5777
- deb
5878
- rpm
5979

60-
61-
archives:
62-
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
63-
replacements:
64-
darwin: Darwin
65-
linux: Linux
66-
windows: Windows
67-
386: i386
68-
amd64: x86_64
69-
format_overrides:
70-
- goos: windows
71-
format: zip
80+
release:
81+
github:
82+
owner: txn2
83+
name: txeh
84+
name_template: "{{.ProjectName}}-v{{.Version}}"
7285

7386
brews:
7487
- name: txeh
75-
tap:
88+
repository:
7689
owner: txn2
7790
name: homebrew-tap
7891
commit_author:
7992
name: Craig Johnston
80-
email: cjimti@gmail.com
81-
folder: Formula
93+
email: cj@imti.co
94+
directory: Formula
8295
homepage: https://github.com/txn2/txeh
8396
description: "Etc Hosts Management Utility."
84-
skip_upload: false
85-
test: |-
86-
txeh version
87-
88-
snapcrafts:
89-
- name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
90-
summary: Etc Hosts Management Utility.
91-
description: |
92-
Kubernetes bulk port forwarding utility.
93-
grade: stable
94-
confinement: classic
97+
license: "Apache-2.0"
98+
test: |
99+
system "#{bin}/txeh version"

0 commit comments

Comments
 (0)