Skip to content

Publish arm64 binaries for linux/mac/windows#701

Closed
charlesoconor wants to merge 3 commits intostackrox:mainfrom
charlesoconor:feature/DE-3-publish-arm64-binaries
Closed

Publish arm64 binaries for linux/mac/windows#701
charlesoconor wants to merge 3 commits intostackrox:mainfrom
charlesoconor:feature/DE-3-publish-arm64-binaries

Conversation

@charlesoconor
Copy link
Contributor

Fixes: #691
Fixes: #404

@charlesoconor charlesoconor requested a review from janisz as a code owner January 24, 2024 20:51
asset_path: linux/kube-linter-linux
asset_name: kube-linter-linux
asset_path: linux/amd64/kube-linter-linux-amd64
asset_name: kube-linter-linux-amd64
Copy link
Collaborator

Choose a reason for hiding this comment

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

this will be a breaking change all users who download with a script need to update

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you want to upload a kube-linter-linux as well as a kube-linter-linux-amd64 for backwards compatibility?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should keep it backward compatible for a one or two releases

asset_path: linux/kube-linter-linux
asset_name: kube-linter-linux
asset_path: linux/amd64/kube-linter-linux-amd64
asset_name: kube-linter-linux-amd64
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you want to upload a kube-linter-linux as well as a kube-linter-linux-amd64 for backwards compatibility?

[[ -n "${GOARCH}" ]] || die "GOARCH must be set"
bin_name="$(basename "$main_srcdir")"
output_file="bin/${GOOS}/${bin_name}"
output_file="bin/${GOOS}/${GOARCH}/${bin_name}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could change this to be part of the file if that makes more sense.

Suggested change
output_file="bin/${GOOS}/${GOARCH}/${bin_name}"
output_file="bin/${GOOS}/${bin_name}-${GOARCH}"

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can change it

@charlesoconor charlesoconor requested a review from janisz January 27, 2024 16:25
Makefile Outdated
Comment on lines 86 to 91
@CGO_ENABLED=0 GOARCH=amd64 GOOS=darwin scripts/go-build.sh ./cmd/kube-linter
@CGO_ENABLED=0 GOARCH=arm64 GOOS=darwin scripts/go-build.sh ./cmd/kube-linter
@CGO_ENABLED=0 GOARCH=amd64 GOOS=linux scripts/go-build.sh ./cmd/kube-linter
@CGO_ENABLED=0 GOARCH=arm64 GOOS=linux scripts/go-build.sh ./cmd/kube-linter
@CGO_ENABLED=0 GOARCH=amd64 GOOS=windows scripts/go-build.sh ./cmd/kube-linter
@CGO_ENABLED=0 GOARCH=arm64 GOOS=windows scripts/go-build.sh ./cmd/kube-linter
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

@janisz janisz left a comment

Choose a reason for hiding this comment

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

Nice, I think we need to keep old linux file name and we are ready to ship it. Ultimately we probably would replace Makefile and workflow with https://goreleaser.com as it does everything we want

@charlesoconor charlesoconor force-pushed the feature/DE-3-publish-arm64-binaries branch from 3a38486 to 5564d1f Compare February 15, 2024 16:41
Update name to have `-$(arch)` instead of in dir path.
@charlesoconor charlesoconor force-pushed the feature/DE-3-publish-arm64-binaries branch from 5564d1f to 5992791 Compare February 15, 2024 18:02
@janisz
Copy link
Collaborator

janisz commented Feb 16, 2024

How about usign goreleaser for this #720

@charlesoconor
Copy link
Contributor Author

How about usign goreleaser for this #720

It makes sense. I can close this out.

@janisz
Copy link
Collaborator

janisz commented Feb 21, 2024

@charlesoconor You may like to see

@charlesoconor charlesoconor deleted the feature/DE-3-publish-arm64-binaries branch February 22, 2024 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE_REQUEST] Common target platforms (ie: linux/arm64) [FEATURE_REQUEST] Publish a mac arm binary

2 participants