Skip to content

Commit

Permalink
Fix goreleaser archive format
Browse files Browse the repository at this point in the history
Use the binary name, not the project name, as the first part of the
artifact. This prevents us from accidentally releasing `base-image` as
`cog`, for example.

As some braces to go with my belt, restrict our archive to only include
the cog binary for now.
  • Loading branch information
nickstenning committed Aug 14, 2024
1 parent 9563ef1 commit 40b6190
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ builds:
- "-s -w -X github.com/replicate/cog/pkg/global.Version={{.Version}} -X github.com/replicate/cog/pkg/global.Commit={{.Commit}} -X github.com/replicate/cog/pkg/global.BuildTime={{.Date}}"
archives:
- format: binary
builds:
- cog # for now we only release cog
name_template: >-
{{ .ProjectName }}_
{{ .Binary }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
Expand Down

0 comments on commit 40b6190

Please sign in to comment.