-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.goreleaser.yaml
98 lines (88 loc) · 2.42 KB
/
.goreleaser.yaml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 1
before:
hooks:
- go mod tidy
- go generate ./...
# generic configuration for all builds that don't need special treatment
builds:
- id: ipfool-general
binary: ipfool
goos:
- freebsd
- linux
- openbsd
- windows
goarch:
- arm64
- amd64
env:
- CGO_ENABLED=0
ldflags:
- "-s -w -X main.version={{ .Version }}"
# macos of course needs special treatment
- id: ipfool-osx
binary: ipfool
goos:
- darwin
goarch:
- arm64
- amd64
goamd64:
- v1
env:
- CGO_ENABLED=0
- VERSION={{ .Version }}
# NOTE: the ${ARCH} envar is created so that the post hook, below, can
# use it to determine the unique dist path for each binary. The default
# convention 'dist/${BuildID}_${BuildTarget}' which isn't as straight-
# forward as it seems. BuildTarget for arm64 is just "arm64" but for
# amd64 it is "amd64-<version>", which is a matrix of everything listed
# in the "goamd" section above this comment. Currently we only support
# v1 but if we change it or add more we will need to adjust this
# accordingly
- >-
{{- if eq .Arch "amd64"}}ARCH=amd64_v1{{- end }}
{{- if eq .Arch "arm64"}}ARCH=arm64{{- end }}
ldflags:
- "-s -w -X main.version={{ .Version }}"
hooks:
post: |
sh -c build/buildosx.sh
#Configuration for building packages for rpm and deb package managers
nfpms:
- id: ipfool-general
package_name: ipfool
homepage: https://github.com/c-robinson/ipfool/
maintainer: Chad Robinson <chadr@zang.com>
description: |-
Tool for viewing, manipulating and goofing around with IP addresses and networks
formats:
- rpm
- deb
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
format: zip
allow_different_binary_count: true
checksum:
extra_files:
- glob: ./dist/ipfool_*_Darwin_*.zip
release:
extra_files:
- glob: ./dist/ipfool_*_Darwin_*.zip
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"