|
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 | + |
2 | 13 | builds: |
3 | 14 | - id: txeh |
4 | | - # Path to main.go file. |
5 | | - # Default is `main.go` |
6 | 15 | main: ./txeh/txeh.go |
7 | 16 | 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 |
15 | 17 | 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 |
23 | 21 | 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}} |
31 | 40 |
|
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] |
33 | 53 |
|
34 | 54 | checksum: |
35 | 55 | name_template: '{{ .ProjectName }}_checksums.txt' |
36 | 56 |
|
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 |
47 | 66 |
|
48 | 67 | 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 |
51 | 71 | description: Etc Hosts Management Utility. |
52 | | - maintainer: Craig Johnston <cjimti@gmail.com> |
| 72 | + maintainer: Craig Johnston <cj@imti.co> |
53 | 73 | license: Apache 2.0 |
54 | | - vendor: https://github.com/txn2 |
| 74 | + vendor: txn2 |
55 | 75 | formats: |
56 | 76 | - apk |
57 | 77 | - deb |
58 | 78 | - rpm |
59 | 79 |
|
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}}" |
72 | 85 |
|
73 | 86 | brews: |
74 | 87 | - name: txeh |
75 | | - tap: |
| 88 | + repository: |
76 | 89 | owner: txn2 |
77 | 90 | name: homebrew-tap |
78 | 91 | commit_author: |
79 | 92 | name: Craig Johnston |
80 | | - email: cjimti@gmail.com |
81 | | - folder: Formula |
| 93 | + email: cj@imti.co |
| 94 | + directory: Formula |
82 | 95 | homepage: https://github.com/txn2/txeh |
83 | 96 | 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