Make `ruby` platform build the `devfile` executable upon install, like other standard native gems
MRs:
Support multiple devfile binaries on "Ruby" pla... (!74 - merged)
Description
We should change the ruby platform of the devfile gem to have support for selecting the appropriate devfile executable at runtime. We could set up scripts at install time that will build our go code from scratch, but we have decided to pre-build go binaries for the following common Gitlab os/arch
| Linux | Darwin | |
|---|---|---|
| amd64 | Y | Y |
| arm64 | Y | Y |
and bundle them in the gem. If an unfamiliar setup is detected, we should report back a clear error message saying it is not supported
AC
-
rubyplatform gem can run on any of theos/archpairs in the matrix above -
reporting a clear error message in the case of an unsupported arch
Background
So traditionally (and mistakenly probably) we published the ruby platform as only thge darwin arm64 version (MacOS)
Now for legacy reasons (and reasons of how the GitLab Gemfile works too, I think), we need to still have some ruby platform, so we keep it as just the MacOS one.
This is even documented here https://gitlab.com/gitlab-org/ruby/gems/devfile-gem/-/blob/531e2cbc992078445eff91e605de82ab71b3a83e/.gitlab/ci/gem-release.yml#L32
variables:
DEVFILE_FILENAME_FORMAT: "devfile-%s.gem"
# This is being done for backward compatibility reasons.
# In the past, the devfile-gem with "ruby" platform has had its Go binary built on.
# macOS machines
GOOS: "darwin"
GOARCH: "arm64"