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

Release Binaries #1300

Open
drewgonzales360 opened this issue Nov 9, 2023 · 1 comment
Open

Release Binaries #1300

drewgonzales360 opened this issue Nov 9, 2023 · 1 comment

Comments

@drewgonzales360
Copy link

Hi, I know you can go install, but I have a use case where I need to build it for a different architecture and I can't

GOARCH=${TARGETARCH} GOOS=${TARGETOS} go install github.com/onsi/ginkgo/v2/ginkgo@v2.13.0

I'm happy to throw a PR up, but I was wondering if it's possible for us to add compiled binaries to the Github release information. As a work around, I'm cloning the repo and calling go build, but I'd rather just download binaries so that I know that all the build flags match others.

@onsi
Copy link
Owner

onsi commented Nov 10, 2023

hey @drewgonzales360 - I've resisted going down this path for a few reasons:

Most importantly: it's important that the version of the ginkgo cli and the ginkgo library match exactly. The contract between the cli and the library is not subject to semver and can change at any time. today the recommendation is to go install or, even better, go run github.com/onsi/ginkgo/v2/ginkgo ... as that will pick up the same version of ginkgo as the library in go.mod. Decoupling the two could be problematic and potentially confusing to users.

Secondarily: I've never thought this would be necessary. Ginkgo runs tests and so it either needs to compile the tests (in which case the go toolchain needs to be present on the machine anyway, so we can always go run or go install the ginkgo cli as mentioned above). Or Ginkgo needs to be pointed at a precompiled test binary. But if the user can compile a test binary with the correct GOARCH and GOOS then they can correctly compile the ginkgo cli of the correct and ship it to their target platform.

So I suppose I'd love to learn more about your usecase, given that second point. What are the reasons you can't compile ginkgo on demand or at the same time that you precompile your test binary?

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

No branches or pull requests

2 participants