Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(cli): build nix binaries for both x64 and arm64 #2492

Merged
merged 3 commits into from
Jul 24, 2023

Conversation

klaude
Copy link
Contributor

@klaude klaude commented Jun 26, 2023

Fixes #2189.

Checklist

Not applicable. Tests were run, and documentation was checked, but these changes don't require test or documentation changes.

  • Tests added / updated
  • Docs added / updated

Does this PR introduce a breaking change?

  • Yes
  • No

If indicated yes above, please describe the breaking change(s).

Release binaries for Linux, macOS, and Alpine now have their arch suffixed to their names. Prior to the change, release binaries were named:

  • spectral-linux
  • spectral-macos
  • spectral-alpine

They are now:

  • spectral-linux-x64
  • spectral-linux-arm64
  • spectral-macos-x64
  • spectral-macos-arm64
  • spectral-alpine-x64
  • spectral-alpine-arm64

The installation script has been updated to work with this change, but it breaks workflows for users or systems who depend on the original naming pattern.

I can copy the x64 binaries to files with their original name to prevent the BC break, but that could make the file list in the release look a little confusing.

Additional context

Unrelated to binary builds is a fix to the installation script that will prevent bugs when executing the script from a directory with a space in its name.

Thanks for checking this out! I'm open to commentary and suggestions.

@klaude klaude changed the title Build nix binaries for both x64 and arm64 feat(cli): Build nix binaries for both x64 and arm64 Jun 26, 2023
@klaude klaude marked this pull request as ready for review June 26, 2023 21:16
@klaude klaude requested a review from a team as a code owner June 26, 2023 21:16
@klaude
Copy link
Contributor Author

klaude commented Jun 26, 2023

I fixed the PR's subject to conform to Conventional Changelog's formatting, but can't re-run the lint job to verify. I'm afraid one of y'all may need to re-run it to verify it passes now.

Build x86 and arm64 binaries for the linux, macos, and alpine platforms.
Adjust the installation script to detect the OS and architecture then
download the correct binary.
Add quotes to shell variables to prevent unexpected behavior if the
install script is executed from a directory with a space in its name.
@P0lip P0lip changed the title feat(cli): Build nix binaries for both x64 and arm64 build(cli): build nix binaries for both x64 and arm64 Jul 24, 2023
@P0lip
Copy link
Contributor

P0lip commented Jul 24, 2023

Thanks!

@P0lip P0lip enabled auto-merge (squash) July 24, 2023 15:33
@P0lip P0lip merged commit ed6b65c into stoplightio:develop Jul 24, 2023
9 checks passed
@alireza-mht
Copy link

Hi. I face an issue in downloading the image in install.sh. I get the below error:
Error requesting. Download binary from https://github.com/stoplightio/spectral/releases/latest/download/spectral-linux-x64
while https://github.com/stoplightio/spectral/releases/latest/download/spectral-linux is working fine.

This is the link to the doc: https://meta.stoplight.io/docs/spectral/b8391e051b7d8-installation#executable-binaries

Is there a plan to fix this issue? Is it possible to upload the binaries with arch-suffix?

Thanks!

@P0lip
Copy link
Contributor

P0lip commented Jul 24, 2023

@alireza-mht done!

@alireza-mht
Copy link

@P0lip Thanks!

@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version 6.9.0 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docker] Build for M1 Macs
4 participants