1- # This is an example .goreleaser.yml file with some sensible defaults.
2- # Make sure to check the documentation at https://goreleaser.com
1+ version : 2
2+
33before :
44 hooks :
55 - go mod tidy
@@ -11,15 +11,20 @@ builds:
1111 - env :
1212 - CGO_ENABLED=0
1313 ldflags :
14- - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser
14+ - -s
15+ - -w
16+ - -X main.VERSION={{.Version}}
17+ - -X main.LASTMOD={{.Timestamp}}
18+ - -X main.COMMIT={{.ShortCommit}}
19+ - -X main.BUILTBY=goreleaser
1520 main : ./cmd/fflint/main.go
1621 goos :
1722 - linux
1823 - windows
1924 - darwin
2025
2126archives :
22- - format : tar.gz
27+ - formats : [ tar.gz ]
2328 # this name template makes the OS and Arch compatible with the results of uname.
2429 name_template : >-
2530 {{ .ProjectName }}_
@@ -30,20 +35,67 @@ archives:
3035 {{- if .Arm }}v{{ .Arm }}{{ end }}
3136 # use zip for windows archives
3237 format_overrides :
33- - goos : windows
34- format : zip
38+ - goos : windows
39+ formats : [ zip ]
40+ files :
41+ - src : README.md
42+ info :
43+ owner : root
44+ group : root
45+ mtime : " {{ .CommitDate }}"
46+ - src : LICENSE.md
47+ info :
48+ owner : root
49+ group : root
50+ mtime : " {{ .CommitDate }}"
51+ - src : completions/*
52+ info :
53+ owner : root
54+ group : root
55+ mtime : " {{ .CommitDate }}"
56+ - src : manpages/*
57+ info :
58+ owner : root
59+ group : root
60+ mtime : " {{ .CommitDate }}"
61+
3562checksum :
3663 name_template : ' checksums.txt'
64+
3765snapshot :
38- name_template : " {{ incpatch .Version }}-next"
66+ version_template : " {{ incpatch .Version }}-next"
67+
3968changelog :
4069 sort : asc
4170 filters :
4271 exclude :
4372 - ' ^docs:'
4473 - ' ^test:'
4574
46- # The lines beneath this are called `modelines`. See `:help modeline`
47- # Feel free to remove those if you don't want/use them.
48- # yaml-language-server: $schema=https://goreleaser.com/static/schema.json
49- # vim: set ts=2 sw=2 tw=0 fo=cnqoj
75+ homebrew_casks :
76+ - name : fflint
77+ binaries :
78+ - fflint
79+ manpages :
80+ - manpages/fflint.1.gz
81+ completions :
82+ bash : completions/fflint.bash
83+ zsh : completions/fflint.zsh
84+ fish : completions/fflint.fish
85+ directory : Casks
86+ skip_upload : false
87+ description : " File formt linter"
88+ homepage : " https://www.fflint.dev/"
89+ license : " MIT"
90+ repository :
91+ owner : FileFormatInfo
92+ name : homebrew-tap
93+ branch : main
94+ token : " {{ .Env.HOMEBREW_TOKEN }}"
95+ hooks :
96+ post :
97+ install : |
98+ if OS.mac?
99+ system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/fflint"]
100+ end
101+
0 commit comments