-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy path.goreleaser.yml
More file actions
228 lines (215 loc) · 7.32 KB
/
Copy path.goreleaser.yml
File metadata and controls
228 lines (215 loc) · 7.32 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
version: 2
project_name: newrelic-cli
before:
hooks:
- go mod download
builds:
- id: newrelic
dir: cmd/newrelic
binary: newrelic
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
- arm
goarm:
- 7
# Pin the arm64 variant explicitly so the resulting dist subdirectory
# (dist/newrelic_linux_arm64_v8.0) stays stable across future goreleaser
# v2.x versions that might change the default variant. amd64 already uses
# the _v1 suffix by default; keeping arm64 pinned matches that behavior.
goarm64:
- v8.0
ignore: # go-ole is currently 32-bit only. Remove this when support is added
- goos: windows
goarch: arm
- goos: windows
goarch: arm64
ldflags:
- -s -w -X main.version={{.Version}} -X main.appName={{.Binary}}
-X github.com/newrelic/newrelic-cli/internal/cli.version={{.Version}}
release:
name_template: "{{.ProjectName}} v{{.Version}}"
extra_files:
- glob: scripts/install.sh
name_template: "install.sh"
- glob: scripts/install.ps1
name_template: "install.ps1"
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
algorithm: sha256
extra_files:
- glob: "scripts/install.sh"
- glob: "scripts/install.ps1"
archives:
- id: "default"
ids:
- newrelic
# Preserve legacy v1 archive naming (Darwin/Linux/Windows/i386/x86_64,
# armv7 for goarm=7) by templating the Os/Arch instead of using the
# removed `replacements` field. The `.Arm` suffix is critical: without it,
# linux/arm+goarm=7 would produce Linux_arm.tar.gz instead of
# Linux_armv7.tar.gz — this asset-name mismatch is what broke customer
# install.sh downloads in the reverted v0.109.0 release.
name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{- if eq .Os "darwin" }}Darwin
{{- else if eq .Os "linux" }}Linux
{{- else if eq .Os "windows" }}Windows
{{- else }}{{ .Os }}{{ end }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- with .Arm }}v{{ . }}{{ end }}
format_overrides:
- goos: windows
formats: [zip]
files:
- CHANGELOG.md
- LICENSE
- README.md
signs:
- artifacts: all
args:
[
"-u",
# GPG Key ID Updated on 29 April 2025 - Expires 27 April 2027
"4F9A9B5B96EC30B9",
# When the Key ID here is updated, it has to be paired with an update
# to the PGP_PRIVATE_KEY attribute consumed by GitHub Workflows
"--output",
"${signature}",
"--detach-sign",
"${artifact}",
]
dockers:
- dockerfile: build/package/Dockerfile
image_templates:
- "newrelic/cli:{{ .Tag }}-amd64"
- "newrelic/cli:v{{ .Major }}.{{ .Minor }}-amd64"
- "newrelic/cli:latest-amd64"
use: buildx
build_flag_templates:
- "--pull"
- "--label=repository=http://github.com/newrelic/newrelic-cli"
- "--label=homepage=https://developer.newrelic.com/"
- "--label=maintainer=Developer Toolkit <opensource@newrelic.com>"
- "--platform=linux/amd64"
- "--provenance=false"
- "--sbom=false"
goarch: amd64
- dockerfile: build/package/Dockerfile
image_templates:
- "newrelic/cli:{{ .Tag }}-arm64"
- "newrelic/cli:v{{ .Major }}.{{ .Minor }}-arm64"
- "newrelic/cli:latest-arm64"
use: buildx
build_flag_templates:
- "--pull"
- "--label=repository=http://github.com/newrelic/newrelic-cli"
- "--label=homepage=https://developer.newrelic.com/"
- "--label=maintainer=Developer Toolkit <opensource@newrelic.com>"
- "--platform=linux/arm64"
- "--provenance=false"
- "--sbom=false"
goarch: arm64
docker_manifests:
- name_template: "newrelic/cli:{{ .Tag }}"
image_templates:
- "newrelic/cli:{{ .Tag }}-amd64"
- "newrelic/cli:{{ .Tag }}-arm64"
- name_template: "newrelic/cli:v{{ .Major }}.{{ .Minor }}"
image_templates:
- "newrelic/cli:v{{ .Major }}.{{ .Minor }}-amd64"
- "newrelic/cli:v{{ .Major }}.{{ .Minor }}-arm64"
- name_template: "newrelic/cli:latest"
image_templates:
- "newrelic/cli:latest-amd64"
- "newrelic/cli:latest-arm64"
# Uses git-chglog output from release flow
changelog:
disable: false
# snapcrafts:
# - id: newrelic
# builds:
# - newrelic
# name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
# replacements:
# darwin: Darwin
# linux: Linux
# windows: Windows
# 386: i386
# amd64: x86_64
# name: newrelic-cli
# publish: true
# summary: A project to consolidate some tools New Relic offers for managing resources.
# description: |
# The New Relic CLI is an officially supported command line interface for New
# Relic, released as part of the Developer Toolkit.
# # A guardrail to prevent you from releasing a snap to all your users before
# # it is ready.
# # `devel` will let you release only to the `edge` and `beta` channels in the
# # store. `stable` will let you release also to the `candidate` and `stable`
# # channels. More info about channels here:
# # https://snapcraft.io/docs/reference/channels
# grade: stable
# confinement: strict
# license: Apache-2.0
# base: core18
# apps:
# # The name of the app must be the same name as the binary built or the snapcraft name.
# newrelic:
# # If your app requires extra permissions to work outside of its default
# # confined space, declare them here.
# # You can read the documentation about the available plugs and the
# # things they allow:
# # https://snapcraft.io/docs/reference/interfaces.
# plugs: ["home", "network"]
scoops:
- repository:
owner: newrelic
name: newrelic-cli
commit_author:
name: nr-developer-toolkit
email: developer-toolkit@newrelic.com
commit_msg_template: "chore(scoop): update for {{ .ProjectName }} version {{ .Tag }}"
homepage: https://github.com/newrelic/newrelic-cli
url_template: "https://github.com/newrelic/newrelic-cli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
description: |
The New Relic CLI is an officially supported command line interface for New
Relic, released as part of the Developer Toolkit.
license: Apache-2.0
nfpms:
- id: newrelic
package_name: newrelic-cli
# Preserve v1 file naming (Darwin/Linux/x86_64/i386) via templating instead
# of the removed `replacements` field.
file_name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{- if eq .Os "darwin" }}Darwin
{{- else if eq .Os "linux" }}Linux
{{- else if eq .Os "windows" }}Windows
{{- else }}{{ .Os }}{{ end }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
ids:
- newrelic
vendor: New Relic
homepage: https://github.com/newrelic/newrelic-cli
maintainer: opensource@newrelic.com
description: |
The New Relic CLI is an officially supported command line interface for New
Relic, released as part of the Developer Toolkit.
license: Apache 2.0
formats:
- deb
- rpm
bindir: /usr/local/bin
epoch: 1
release: 1