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

Allow setting build env variables such as GOOS=windows GOARCH=amd64 #75

Open
the0rem opened this issue Jul 24, 2022 · 0 comments
Open

Comments

@the0rem
Copy link

the0rem commented Jul 24, 2022

We have a windows-specific app that needs to be built from both our local machines (MacOS) as well as our CI (Linux). We can set environment variable in CI however local development is hindered with this limitation and doesn't really fall within the NX approach if you have to set variables outside of the build tooling.

One suggestion is to pass the cwd option to the runGoCommand when building. This would allow you to set any environmental variables required.

I'm not sure how you cater for this in https://github.com/nx-go/nx-go/blob/main/packages/nx-go/src/executors/build/executor.ts as the file naming logic is looking at the platform to decide whether to set the file extension.

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

1 participant