/
.goreleaser.yml
84 lines (81 loc) · 2.03 KB
/
.goreleaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
project_name: articli
builds:
- env:
- CGO_ENABLED=0
binary: acli
goarch:
- amd64
- arm64
goos:
- windows
- linux
- darwin
# hooks:
# post:
# - upx "{{ .Path }}"
ldflags:
- -X main.version={{.Version}}
- -X main.commit={{.Commit}}
- -X main.date={{.Date}}
- -w
- -s
flags:
- --trimpath
main: ./cmd/articli
dist: release # The dist folder
archives:
- rlcp: true
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next-{{.ShortCommit}}"
# https://goreleaser.com/customization/changelog/
changelog:
skip: false
use: git
sort: asc
groups:
- title: Features
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: 'Bug fixes'
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: Others
order: 999
filters:
exclude:
- "^docs:"
- "^test:"
# https://goreleaser.com/customization/homebrew/
brews:
- name: acli
tap:
owner: k8scat
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TOKEN }}"
url_template: "https://github.com/k8scat/articli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Git author used to commit to the repository.
# Defaults are shown.
commit_author:
name: goreleaserbot
email: goreleaser@carlosbecker.com
homepage: "https://github.com/k8scat/articli"
description: "Manage content in multi platforms."
# Packages your package depends on.
dependencies:
- name: git
# So you can `brew test` your formula.
# Default is empty.
test: |
system "#{bin}/acli version"
# Custom install script for brew.
# Default is 'bin.install "program"'.
install: |
bin.install "acli"
# Install bash completion
output = Utils.safe_popen_read("#{bin}/acli", "completion", "bash")
(bash_completion/"acli").write output
# Install zsh completion
output = Utils.safe_popen_read("#{bin}/acli", "completion", "zsh")
(zsh_completion/"_acli").write output