Skip to content

Commit c2e7ce1

Browse files
committed
defect: Address release failure.
1 parent b0cdfff commit c2e7ce1

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

.goreleaser.yaml

+25-18
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ builds:
9696
ldflags:
9797
- -s -w -X github.com/sixafter/nanoid-cli/cmd/version.version={{ .Version }} -X github.com/sixafter/nanoid-cli/cmd/version.gitCommitID={{ .Env.X_BUILD_COMMIT }}
9898

99+
# Set the modified timestamp on the output binary, typically
100+
# you would do this to ensure a build was reproducible.
101+
# Pass an empty string to skip modifying the output.
102+
#
103+
# Templates: allowed.
104+
mod_timestamp: "{{ .CommitTimestamp }}"
105+
99106
# GOOS list to build for.
100107
# For more info refer to: https://go.dev/doc/install/source#environment
101108
#
@@ -110,7 +117,6 @@ builds:
110117
#
111118
# Default: [ '386', 'amd64', 'arm64' ].
112119
goarch:
113-
- '386'
114120
- 'amd64'
115121
- 'arm64'
116122

@@ -124,13 +130,24 @@ builds:
124130
goamd64:
125131
- 'v1'
126132

133+
# GOARM to specify which 32-bit arm version to use if there are multiple
134+
# versions from the build section. Brew formulas support only one 32-bit
135+
# version.
136+
#
137+
# Default: 6.
138+
goarm:
139+
- '7'
140+
127141
# Set a specific go binary to use when building.
128142
# It is safe to ignore this option in most cases.
129143
#
130144
# Default: "go".
131145
# Templates: allowed.
132146
# gobinary: "go1.23.3"
133147

148+
flags:
149+
- -trimpath
150+
134151
# Ref: https://goreleaser.com/customization/archive/
135152
archives:
136153
- id: tar
@@ -233,19 +250,18 @@ brews:
233250
# version.
234251
#
235252
# Default: 6.
236-
goarm: "7"
253+
goarm: '7'
237254

238-
# GOAMD64 to specify which amd64 version to use if there are multiple
239-
# versions from the build section.
240-
#
241-
# Default: v1.
242-
# goamd64: v1
255+
# IDs of the archives to use.
256+
# Empty means all IDs.
257+
ids:
258+
- tar
243259

244260
# Templates: allowed.
245261
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
246262

247263
# URL which is determined by the given Token (github, gitlab or gitea).
248-
url_template: "https://github.com/sixafter/nanoid-cli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
264+
# url_template: "https://github.com/sixafter/nanoid-cli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
249265

250266
# Directory inside the repository to put the formula.
251267
directory: Formula
@@ -258,6 +274,7 @@ brews:
258274

259275
# Template: allowed
260276
test: |
277+
system "#{bin}/nanoid version"
261278
assert_match "version", shell_output("#{bin}/nanoid --version")
262279
263280
# Repository to push the generated files to.
@@ -302,13 +319,3 @@ brews:
302319
owner: sixafter
303320
name: homebrew-tap
304321
branch: main
305-
306-
upx:
307-
- # Whether to enable it or not.
308-
#
309-
# Templates: allowed.
310-
enabled: false
311-
312-
# Compress argument.
313-
# Valid options are from '1' (faster) to '9' (better), and 'best'.
314-
compress: best

0 commit comments

Comments
 (0)