SchwarzIT / go-template

go/template is a tool for jumpstarting production-ready Golang projects quickly.
Apache License 2.0
177 stars 26 forks source link

Enhance Makefile to be able to specify build targets #389

Open muellinho opened 5 months ago

muellinho commented 5 months ago

Is your feature request related to a problem? Please describe.

Recently I've built an application with make build and tried to deploy it to CloudFoundry as binary.

During deployment however I received the following error message: Cannot execute binary file: Exec format error

It took a while to realize that I was working on an ARM Mac locally and therefor my executable was built for the wrong architecture.

Describe the solution you'd like

Can the Makefile be enhanced in a way that we can specify the build targets through the use of the vars GOOS and GOARCH?

Describe alternatives you've considered

An alternative that I used and which works is to simply issue the go build command manually and setting above mentioned variables.

Search

Code of Conduct

Additional context

No response

MarvinJWendt commented 4 months ago

Hi, thanks for the feedback. Great idea, we'll look into it!