Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 45 additions & 8 deletions deploy/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ builds:
ignore:
- goos: windows
goarch: arm
- goos: darwin
goarch: arm
ldflags:
- -s -w
- -X github.com/replicatedhq/troubleshoot/pkg/version.version={{ .Version }}
Expand All @@ -38,8 +36,6 @@ builds:
ignore:
- goos: windows
goarch: arm
- goos: darwin
goarch: arm
ldflags:
- -s -w
- -X github.com/replicatedhq/troubleshoot/pkg/version.version={{ .Version }}
Expand Down Expand Up @@ -95,7 +91,39 @@ archives:
dst: .
strip_parent: true


- id: preflight-universal
ids: [preflight-universal]
formats: [tar.gz]
name_template: "preflight_{{ .Os }}_{{ .Arch }}"
files:
- licence*
- LICENCE*
- license*
- LICENSE*
- readme*
- README*
- changelog*
- CHANGELOG*
- src: "sbom/assets/*"
dst: .
strip_parent: true

- id: support-bundle-universal
ids: [support-bundle-universal]
formats: [tar.gz]
name_template: "support-bundle_{{ .Os }}_{{ .Arch }}"
files:
- licence*
- LICENCE*
- license*
- LICENSE*
- readme*
- README*
- changelog*
- CHANGELOG*
- src: "sbom/assets/*"
dst: .
strip_parent: true
Comment thread
cursor[bot] marked this conversation as resolved.

dockers:
- dockerfile: ./deploy/Dockerfile.troubleshoot
Expand All @@ -119,11 +147,20 @@ dockers:
- preflight
skip_push: true


universal_binaries:
- id: preflight-universal
ids: [preflight] # refers to the build id above
replace: true
name_template: preflight

- id: support-bundle-universal
ids: [support-bundle] # refers to the build id above
replace: true
name_template: support-bundle

brews:
- name: preflight
ids: [preflight]
ids: [preflight, preflight-universal]
homepage: https://docs.replicated.com/reference/preflight-overview/
description: "A preflight checker and conformance test for Kubernetes clusters."
repository:
Expand All @@ -133,7 +170,7 @@ brews:
directory: HomebrewFormula
install: bin.install "preflight"
- name: support-bundle
ids: [support-bundle]
ids: [support-bundle, support-bundle-universal]
homepage: https://docs.replicated.com/reference/support-bundle-overview/
description: "Collect and redact support bundles for Kubernetes clusters."
repository:
Expand Down
4 changes: 2 additions & 2 deletions deploy/krew/preflight.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
matchLabels:
os: darwin
arch: amd64
{{addURIAndSha "https://github.com/replicatedhq/troubleshoot/releases/download/{{ .TagName }}/preflight_darwin_amd64.tar.gz" .TagName }}
{{addURIAndSha "https://github.com/replicatedhq/troubleshoot/releases/download/{{ .TagName }}/preflight_darwin_all.tar.gz" .TagName }}
files:
- from: preflight
to: .
Expand All @@ -53,7 +53,7 @@ spec:
matchLabels:
os: darwin
arch: arm64
{{addURIAndSha "https://github.com/replicatedhq/troubleshoot/releases/download/{{ .TagName }}/preflight_darwin_arm64.tar.gz" .TagName }}
{{addURIAndSha "https://github.com/replicatedhq/troubleshoot/releases/download/{{ .TagName }}/preflight_darwin_all.tar.gz" .TagName }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Krew Plugin Installation Fails on Darwin

The Krew plugin configuration for Darwin universal binaries references preflight_darwin_all.tar.gz. However, GoReleaser's name_template creates architecture-specific archives (e.g., preflight_darwin_amd64.tar.gz, preflight_darwin_arm64.tar.gz). This means preflight_darwin_all.tar.gz won't exist, causing Krew plugin installations to fail.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this is valid since with this reversion, the preflight binary will be preflight_darwin_all.tar.gz instead of arm64 and amd64

files:
- from: preflight
to: .
Expand Down
Loading